Search components
Find a component by name
Form
Forms with React Hook Form and Zod: the Form wrapper (FormField, FormItem, FormControl, FormMessage) wires ids and aria for you; Field with Controller is the alternative.
Create the form with useForm and zodResolver(schema), then render each field through React Hook Form's Controller into a Field with FieldLabel, FieldDescription and FieldError. Set data-invalid={fieldState.invalid} on the Field and aria-invalid on the control, and pass errors={[fieldState.error]} to FieldError.
With the Form component
The Form wrapper is what the apps use today and is still supported. FormField wraps Controller, and FormItem, FormControl and FormMessage set the ids, aria-describedby and aria-invalid for you; with Field you set those yourself.
Input
Spread field onto the Input and give it an id for FieldLabel. Validation runs on submit by default; pass mode to useForm ("onChange", "onBlur", "onTouched" or "all") to validate earlier.
Textarea
Spread field onto the Textarea, the same as an input. Set aria-invalid on the textarea and data-invalid on the Field.
Select
Pass field.value and field.onChange to Select as value and onValueChange, and put aria-invalid on the SelectTrigger. The error sits inside FieldContent so it stays under the label in the responsive layout.
Checkbox
For a list of checkboxes, keep an array in field.value and add or remove the item's id in onCheckedChange. Mark the FieldGroup with data-slot="checkbox-group" for its spacing.
Radio Group
Pass field.value and field.onChange to RadioGroup as value and onValueChange. Each option is a RadioGroupItemBoxed choice card, whose id is the option's value; FieldError below the group shows the message.
Switch
Pass field.value and field.onChange to Switch as checked and onCheckedChange. A Zod refine can require it to be on.
Password
useWatch reads the password as it's typed, to drive a strength Progress and a checklist of requirements. The Zod schema enforces the same rules on submit.
Array fields
useFieldArray returns fields, append and remove for a dynamic list. Render one Controller per item named emails.${index}.address, keyed by field.id, and show array-level errors from formState.errors.emails.root.
Complex form
Choice cards, a select, a checkbox list and a switch in one schema, separated by FieldSeparator. Reset any of these forms with form.reset().
Installation
npx shadcn@latest add @refer/formUsage in the apps
Which apps install this component, whether their copy matches the registry, and which files import it.
Imported by 53 files across the apps. From olympus-backend@2ee40d05e, Oct 26, 2026. โIn syncโ means the app's copy matches this registry; refresh with npm run usage:build.