Form
Accessible field wiring that works with any form library, or none.
- Forms
- 1 file
- 1 npm package
- Accessibility notes
pnpm dlx @dowel-ui/cli add formnpm packages installed: radix-ui.
import { Form } from "@/components/ui/form";Default
With Error
Live Validation
Mixed Controls
Animated Messages
<Form>
Plus every attribute of <form>.
<FormField>
| Prop | Type | Default |
|---|---|---|
errorPresent when the field is invalid. Its content is rendered by FormMessage. | ReactNode | — |
nameField name, mirrored onto the wrapper for form-library integration. | string | — |
Plus every attribute of <div>.
<FormLabel>
Every prop of Radix UI’s Label.Root, plus className.
<FormControl>
Every prop of Radix UI’s Slot.Root, plus className.
<FormDescription>
Plus every attribute of <p>.
<FormMessage>
| Prop | Type | Default |
|---|---|---|
animateExitKeeps a cleared message on screen long enough to fade and collapse, rather than removing it at once. The departing copy is | boolean | false |
Plus every attribute of <p>.
7/7
checks passed
- Tested — passes
- axe assertion — passes
- Keyboard tested — does not apply
- Storybook examples — passes
- Accessibility documented — passes
- Semantic tokens only — passes
- Motion from tokens — does not apply
- className merged — passes
- Visible focus — does not apply
- No fixed widths — passes