What it does
Expose a label-friendly checkbox primitive with checked, unchecked, and mixed states.
Use it for independent selections, not mutually exclusive choices.
Composition and API
Import Checkbox from the dedicated checkbox entrypoint. Use appearance and size variants for visual tone, and use rootClassName or controlClassName when you need slot-level styling.
Common use cases
- Terms acceptance in onboarding and checkout flows.
- Bulk selection with a parent indeterminate state.
- Notification and preference lists.
- Feature permissions in admin settings.
Accessibility
The component renders a native checkbox input with visible label composition. Provide a text label or aria-label, and reserve indeterminate state for partial selection.
Next.js integration notes
Use Checkbox inside client components when state changes in the browser. Static defaultChecked examples can still be colocated with App Router preview pages.
FAQ
Does Checkbox support indeterminate state?
Yes. Pass indeterminate to render the mixed visual state and aria-checked=mixed for assistive technology.
Can I control Checkbox state from React?
Yes. Use checked with onCheckedChange for controlled state, or defaultChecked for uncontrolled state.
Is there an animated Checkbox?
Yes. Import CheckboxAnimated from the animated entrypoint to animate the checkmark or mixed-state indicator.