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.

Bug Report
Help us improve by reporting bugs you encounter.
0/100 characters

Include steps to reproduce, expected behavior, and what actually happened.

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.

This is your public display name.

You can manage email addresses in your email settings.

You can @mention other users and organizations.

You can manage your mobile notifications in the mobile settings page.

Select the items you want to display in the sidebar.

Your date of birth is used to calculate your age.

Email Notifications

Receive emails about new products, features, and more.

Receive emails about your account security.

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.

Profile Settings
Update your profile information below.

This is your public display name. Must be between 3 and 10 characters. Must only contain letters, numbers, and underscores.

Textarea

Spread field onto the Textarea, the same as an input. Set aria-invalid on the textarea and data-invalid on the Field.

Personalization
Customize your experience by telling us more about yourself.

Tell us more about yourself. This will be used to help us personalize your experience.

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.

Language Preferences
Select your preferred spoken language.

For best results, select the language you speak.

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.

Notifications
Manage your notification preferences.
Responses

Get notified for requests that take time, like research or image generation.

Tasks

Get notified when tasks you've created have updates.

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.

Subscription Plan
See pricing and features for each plan.
Plan

You can upgrade or downgrade your plan at any time.

Switch

Pass field.value and field.onChange to Switch as checked and onCheckedChange. A Zod refine can require it to be on.

Security Settings
Manage your account security preferences.

Enable multi-factor authentication to secure your account.

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.

Create Password
Choose a strong password to secure your account.
At least 8 characters
One lowercase letter
One uppercase letter
One number
One special character

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.

Contact Emails
Manage your contact email addresses.
Email Addresses

Add up to 5 email addresses where we can contact you.

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().

You're almost there!
Choose your subscription plan and billing period.
Subscription Plan

Choose your subscription plan.

Choose how often you want to be billed.

Add-ons

Select additional features you'd like to include.

Advanced analytics and reporting

Automated daily backups

24/7 premium customer support

Receive email updates about your subscription

Installation

npx shadcn@latest add @refer/form

Usage in the apps

Which apps install this component, whether their copy matches the registry, and which files import it.

PortalIn sync43 files
ArgusIn sync4 files
LandingIn syncNot imported
PartnersIn sync6 files

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.