Skip to main content

Toast

Toast component from Scaffald UI component library.

Import​

import { Toast } from '@scaffald/ui';

Basic Usage​

Toast notifications are imperative and difficult to demo in a static preview. The examples below use Alert components to illustrate the visual styles.

Live Preview
<ThemeProvider initialTheme="light">
<Stack gap={12}>
  <Alert variant="success">Toast: Operation completed!</Alert>
  <Alert variant="error">Toast: Something went wrong</Alert>
</Stack>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Toast components accept standard React Native View props.

Variants​

See component props for available variants.

Examples​

All Variants​

Live Preview
<ThemeProvider initialTheme="light">
<Stack gap={12}>
  <Alert variant="success">Success: Changes saved</Alert>
  <Alert variant="error">Error: Failed to save</Alert>
  <Alert variant="warning">Warning: Unsaved changes</Alert>
  <Alert variant="info">Info: New update available</Alert>
</Stack>
</ThemeProvider>

Accessibility​

  • Keyboard navigation support
  • Screen reader compatible
  • ARIA attributes included
  • Focus management

Design Tokens​

This component uses the following design tokens:

  • Colors: colors.{semantic}.{theme}.{variant}
  • Spacing: spacing.*
  • Typography: typography.*

See Design Tokens for more information.

No related components.

Changelog​

See GitHub Releases for version history.