Form

Accessible form components with validation support using react-hook-form.

Use these React Hook Form wrappers for controlled forms. They compose Field primitives and connect labels, descriptions, and validation messages automatically. Use Field directly for other forms.

Usage

Examples

With description

This is your public display name.

With fieldset

Components

Form

The root form provider that wraps your form. It's a re-export of FormProvider from react-hook-form.

FormField

Connects a form field to react-hook-form's Controller. Provides field context to child components.

FormItem

Container for a form field that provides layout and connects label, control, description, and message.

FormLabel

An accessible label that automatically associates with the form control. Supports an optional tooltip.

FormControl

A slot that passes form field props (id, aria-describedby, aria-invalid) to the form input.

FormDescription

Helper text displayed below the form control.

FormMessage

Displays validation error messages from react-hook-form.

FormFieldset

A fieldset wrapper that can be disabled during form submission.

Props

FormLabel

PropTypeDefaultDescription
tooltipReactNode-Optional tooltip content shown via an info icon
childrenReactNode-The label text

FormFieldset

PropTypeDefaultDescription
disabledbooleanfalseWhether the fieldset and its children are disabled