The Checkbox lets users toggle a boolean option. Built on Radix UI, it supports keyboard interaction and form integration.
Preview
Usage
Installation
$ npx shadcn@latest add https://spark-ui-olive.vercel.app/r/checkbox.json
Properties
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | "indeterminate" | — | Controlled checked state. |
onCheckedChange | (checked: boolean) => void | — | Called when the checked state changes. |
disabled | boolean | false | Disables the checkbox. |
className | string | — | Additional CSS classes. |