Form

Form

Form state management system with validation schema integration, submission handling, error tracking, and field registration

Form

Layout components for building accessible forms with sections, descriptions and actions. Works standalone or with validation libraries like React Hook Form, Yup or Zod.

Basic form

Use Form, FormItem, FormLabel, FormControl and FormMessage to build forms quickly.

Profile

Basic profile information.

Use your real first name.

We'll use this for notifications.

Maximum 280 characters.

Sections & layout

Group related fields into FormSections and separate actions with FormActions. This keeps long forms organized and scannable.

Account

Configure your sign-in details.

Use at least 8 characters, including a number.

Preferences

Control how we contact you.

Affects email content and product copy.

Product updates, tips and curated content.

You must accept to create an account.

You need to accept the terms.

Compact form layout

Use FormCompact for inline or dense layouts such as toolbars, filters or single-row forms.

Usage Guidelines

When to Use

  • Complex forms
  • Multi-step wizards
  • Validation-heavy forms

Accessibility

  • Form role and landmarks
  • Error summary accessible

Performance

  • Uncontrolled by default
  • Minimal re-renders on input

Common Mistakes

  • Not showing all errors at once
  • No success feedback after submission

Frequently Asked Questions

Yes, Form integrates with Zod, Yup, and other validation schema libraries.
Yes, Form supports async validation for server-side checks like username availability.

View on GitHub

See the full source code on GitHub