CHECKBOX
Binary toggle built on Radix UI. Shows a filled square indicator when checked. Supports optional label with auto-generated ID binding.
DEPS:@radix-ui/react-checkbox
PREVIEW
INSTALLATION
USAGE
STATES
UNCHECKED
CHECKED
DISABLED
CHECKED + DISABLED
CONTROLLED
PROPS
| PROP | TYPE | DEFAULT | DESCRIPTION |
|---|---|---|---|
| label | string | — | Optional text label rendered next to the checkbox. Auto-generates the id/htmlFor binding. |
| checked | boolean | "indeterminate" | — | Controlled checked state. |
| defaultChecked | boolean | false | Initial checked state (uncontrolled). |
| onCheckedChange | (checked: boolean | "indeterminate") => void | — | Callback fired when the checked state changes. |
| disabled | boolean | false | Disables the checkbox and reduces opacity. |
| id | string | — | Override the auto-generated id. |