Components
Form
Form
Building forms with React Hook Form integration and validation.
Demo
Code
Email
Password
Sign In
Installation
Usage
Basic Usage
With Description
With Checkbox
With Select
API Reference
Form
The form provider component (re-export of FormProvider).
| Prop | Type | Default | Description |
|---|---|---|---|
...methods | UseFormReturn | Required | React Hook Form methods |
FormField
Controller component for form fields.
| Prop | Type | Default | Description |
|---|---|---|---|
control | Control | Required | Form control from useForm |
name | string | Required | Field name |
render | ({ field, fieldState }) => ReactNode | Required | Render function |
FormItem
Container for a form field.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Field content |
className | string | — | Additional classes |
FormLabel
Label for a form field.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Label text |
className | string | — | Additional classes |
FormDescription
Helper text for a form field.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | Required | Description text |
className | string | — | Additional classes |
FormMessage
Displays validation error messages.
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | — | Custom message |
className | string | — | Additional classes |