Shadcn.io is not affiliated with official shadcn/ui
Form with Checkbox
A React form with multiple Checkbox controls validated using React Hook Form and Zod requiring terms acceptance with optional preferences
Checkbox validation enforces required agreements—terms must be accepted before submission. This React form uses React Hook Form with Zod schema validation for Checkbox fields featuring required terms checkbox using z.boolean refine ensuring true value while marketing and security are optional. Built with FormField horizontal layout and FormMessage inline error display, checkbox validation enforces agreements—perfect for terms acceptance, newsletter preferences, notification settings, or anywhere checkbox consent needs validation preventing submission without required acknowledgment.
Form with Checkbox preview
Installation
Related Components
Form with Switch
Toggle-based preference form
Mixed Controls
Form combining multiple control types
Checkbox
Unvalidated checkbox control
Switch Toggle
Binary toggle control
Dialog Form
Modal form with checkboxes
Error Alert
Validation error display
FAQ
Was this page helpful?
Sign in to leave feedback.