Skip to main content

Form

Form component from Scaffald UI component library.

Import​

import { Form, FormField, FormActions } from '@scaffald/ui';

Basic Usage​

Live Preview
<ThemeProvider initialTheme="light">
<Form>
  <Stack gap={16} style={{maxWidth: 400}}>
    <FormField label="Name">
      <Input placeholder="Enter your name" />
    </FormField>
    <FormField label="Email">
      <Input placeholder="you@example.com" />
    </FormField>
    <FormActions>
      <Button variant="outline">Cancel</Button>
      <Button variant="filled" color="primary">Submit</Button>
    </FormActions>
  </Stack>
</Form>
</ThemeProvider>

Props​

See the TypeScript definitions for the complete props API.

Common Props​

All Form components accept standard React Native View props.

Variants​

See component props for available variants.

Examples​

Advanced Usage​

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

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.