Skip to main content

Alert

Inline notification component for contextual messages. Supports different severity levels and actions.

Import​

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

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Alert>Content</Alert>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Alert components accept standard React Native View props.

Variants​

Severity Levels​

  • info - Informational messages
  • success - Success confirmations
  • warning - Warning notices
  • error - Error messages

Examples​

Advanced Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Stack gap={12}>
  <Alert variant="info">Informational message</Alert>
  <Alert variant="success">Success message</Alert>
  <Alert variant="warning">Warning message</Alert>
  <Alert variant="error">Error message</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.