Checkbox
Live example
Checkbox
Installation
npx shadcn@latest add https://hextech-ui.vercel.app/r/checkbox.jsonAPI reference
These are the main Checkbox options. See the exported TypeScript types for inherited native or primitive props.
| Prop | Type | Default |
|---|---|---|
checked / defaultChecked | boolean | false |
indeterminate | boolean | false |
onCheckedChange | (checked, details) => void | — |
Checked state
Use checked with onCheckedChange, or defaultChecked for local state. Keep a visible label beside the control. Indeterminate is a mixed visual state, so explain what the parent selection represents.