- Docs
- Components
- Form
Form
A form component that coordinates submission and validation.
Form is a client-only adapter around React Aria Components. It exists
to: - Explicitly define a client boundary ("use client") - Isolate React
Aria as an implementation detail - Provide a stable public API and
consistent developer experience Form is a minimal, non-visual coordination
layer. It handles submission and validation but does not manage field
state or control layout. For field composition, use
Field. See the Forms architecture
overview to understand the complete system.
Installation
Overview
Form is a minimal, non-visual component that coordinates:
- Form submission via
onSubmit - Server-side validation errors via
validationErrors - Reset handling via
onReset
Form does not:
- Manage field state
- Control layout
- Replace the Field component
- Render visual elements or field containers
For layout and field composition, use the Field component.
Understanding the architecture
Form is only responsible for submission and validation coordination. It does not handle:
- Individual field layout → Use Field
- Input behavior and accessibility → Use TextField or similar
- Complex form state → See Forms overview for library integrations
Recommended reading:
- Forms architecture overview – Complete explanation of the three-layer system
- Field documentation – The composition root for all form fields
Anatomy
Form Libraries
For complex forms with client-side validation and state management, see the Forms guide:
- TanStack Form - Headless form state management
- React Hook Form - Performance-focused forms
- React Aria - Native HTML validation
Examples
Basic
Component textfield-form not found in registry.
Server Validation
Use the validationErrors prop to display server-side validation errors.
Reset
API Reference
Form accepts all props from React Aria's Form.
| Prop | Type | Default |
|---|---|---|
validationErrors | object | |
validationBehavior | enum | "native" |
onSubmit | function | |
onReset | function | |
onInvalid | function |
Field Examples
See the following components for form integration examples: