Checkbox
Lets a user toggle a binary or indeterminate choice.
@rivetui/checkboxPreview
Explore each composition interactively, then open its code in the same context.
With supporting text
Connect the control, label, and description so the complete field remains understandable.
Send operational metrics without account identifiers.
Selection states
Checkboxes support unchecked, checked, indeterminate, and disabled states.
Validation
Expose invalid state semantically and associate the control with its error message.
Approval is required to continue.
Registry
Installation
Add the component source and its declared dependencies with the shadcn CLI.
Install component
bunx --bun shadcn@latest add @rivetui/checkboxPublic interface
API reference
Component-specific props are listed here. Native element and Base UI props continue to pass through.
| Prop | Type | Default |
|---|---|---|
checked | boolean | — |
defaultChecked | boolean | false |
onCheckedChange | (checked: boolean, details) => void | — |
indeterminate | boolean | false |
disabled | boolean | false |