Checkbox
Toggle a value in a group or form.
Installation
import { Checkbox } from "~/components/ui/Checkbox";Usage
<Checkbox defaultChecked />
<Checkbox />API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| checked | boolean | - | Controlled checked state. |
| defaultChecked | boolean | false | Uncontrolled initial state. |
| onCheckedChange | (checked: boolean) => void | - | Called when the state changes. |
| disabled | boolean | false | Disable the checkbox. |
Accessibility
- Built on the Base UI Checkbox primitive with role=checkbox and full keyboard support.
- State is exposed via data-checked / data-disabled for styling.