Form
Composable form building blocks with built-in validation state and accessible label/error associations. Integrates with react-hook-form.
$cookest-ui add form
Recipe Submission Form
A fully validated form with labels, descriptions, and inline error messages.
| Prop | Type | Default | Description |
|---|---|---|---|
Form | ReactNode | — | Wraps the form and provides react-hook-form context. |
FormField | { control, name, render } | — | Connects a form field to the form state. |
FormItem | ReactNode | — | Groups the label, control, description, and message. |
FormLabel | ReactNode | — | The field label — automatically associates with the control. |
FormControl | ReactNode | — | Wraps the actual input element. |
FormDescription | ReactNode | — | Helper text displayed below the input. |
FormMessage | — | — | Displays the validation error message automatically. |