Checkbox
A control that allows the user to toggle between checked and unchecked states. Built on Radix UI Checkbox.
With Label
By checking this, you agree to our Terms of Service.
Checked By Default
Pass defaultChecked to start in the checked state (uncontrolled).
Disabled
Pass disabled to prevent interaction.
Multiple Checkboxes
Combine multiple checkboxes for picking several options.
Indeterminate
The indeterminatestate is useful for “select all” parent checkboxes when only some children are checked:
Installation
Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | 'indeterminate' | — | Controlled checked state. |
onCheckedChange | (checked: boolean | 'indeterminate') => void | — | Callback when checked state changes. |
defaultChecked | boolean | false | Uncontrolled default checked state. |
disabled | boolean | false | Prevents interaction. |
required | boolean | — | Marks the checkbox as required in a form. |
name | string | — | Name for form submission. |