Form
Groups fields and handles validation and submission.
form-demo.tsx
Installation
The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.
npm
yarn
pnpm
bun
Composition
FormTextFieldInstall each field separately.
ButtonSet type="submit".
Custom validation
Return an error message from validate, or null when the value is valid.
form-validation-demo.tsx
Server errors
Pass server errors to validationErrors, keyed by field name. Push Save with "maya" to see one.
form-server-errors-demo.tsx
API reference
Form takes the props of React Aria Form (opens in a new tab).