Skip to main content

Modal

Overlay dialog component for focused interactions. Includes backdrop, animations, and focus management.

Import​

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

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Stack gap={12} style={{padding: 16, borderWidth: 1, borderColor: '#e0e0e0', borderRadius: 12, maxWidth: 400, backgroundColor: '#fff'}}>
  <Text size="lg" weight="bold">Modal Preview</Text>
  <Text>This shows what modal content looks like. In real usage, Modal renders as an overlay.</Text>
  <Row gap={8} style={{justifyContent: 'flex-end'}}>
    <Button variant="outline">Cancel</Button>
    <Button variant="filled" color="primary">Confirm</Button>
  </Row>
</Stack>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Modal components accept standard React Native View props.

Variants​

See component props for available variants.

Examples​

Confirmation Dialog​

// Example implementation
<Modal variant="default">
Example content
</Modal>

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.