Utility
AI
Terminal
Installation
pnpm dlx shadcn@latest add https://termcn.dev/r/checkbox.json
Usage
import { Checkbox } from "@/components/ui/checkbox";<Checkbox checked label="Enable telemetry" onChange={(checked) => {}} />API Reference
Checkbox
| Prop | Type | Default |
|---|---|---|
checked | boolean | undefined |
onChange | (checked: boolean) => void | undefined |
label | string | undefined |
indeterminate | boolean | false |
disabled | boolean | false |
id | string | undefined |
checkedIcon | string | "■" |
uncheckedIcon | string | "□" |
indeterminateIcon | string | "▪" |