Skip to content

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.

Choose a clear, recognisable name.

The primary cuisine type of this recipe.

Optional — shown on the recipe card.

PropTypeDefaultDescription
FormReactNodeWraps the form and provides react-hook-form context.
FormField{ control, name, render }Connects a form field to the form state.
FormItemReactNodeGroups the label, control, description, and message.
FormLabelReactNodeThe field label — automatically associates with the control.
FormControlReactNodeWraps the actual input element.
FormDescriptionReactNodeHelper text displayed below the input.
FormMessageDisplays the validation error message automatically.