005
Checkbox
Formunchecked
Customize
State
Disabled
Label
Code
<Checkbox>Agree to the terms</Checkbox>
Install
npx shadcn@latest add https://components.haedong.dev/r/checkbox.json
Props
Extends the native input props (checked, defaultChecked, onChange, name, …). Renders a <label> around the input, so children is the label text.
| Prop | Type | Description |
|---|---|---|
| indeterminate | boolean | Mixed state, shown as a bar. Set via the DOM property; clicking resolves it like the native control. |
| children | ReactNode | Label text. Omit for a bare box and pass aria-label instead. |
| disabled | boolean | Native disabled; dims the item to 40% and drops pointer events. |
| className | string | Extra classes for the wrapping label. |