Launch sale — 60% off Pro
Contact
FormAdvanced

Not affiliated with official shadcn/ui. Visit ui.shadcn.com for official docs.

React Form with Checkbox

A React form with multiple Checkbox controls validated using React Hook Form and Zod requiring terms acceptance with optional preferences

Looking to implement shadcn/ui patterns?

Join our Discord community for help from other developers.


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.

Receive emails about new products and features.

Receive emails about account security.

You agree to our Terms of Service and Privacy Policy.

Pattern created by @haydenbleasel

Installation

Questions you might have