Checkbox
A checkbox whose tick draws itself in. Supports the indeterminate state.
InputsRadix Checkbox
A teammate must review before production.
Playground
Tweak the props, the preview and the code follow.
Props
<div className="flex items-center gap-2.5"> <Checkbox id="terms" defaultChecked /> <Label htmlFor="terms">Accept terms and conditions</Label> </div>
Installation
npx @plumsydev/plum-ui add checkboxAlso pulls in label automatically.
Usage
import { Checkbox } from "@/components/ui/checkbox"<Checkbox id="terms" />Examples
Indeterminate
Pass checked="indeterminate" for a parent that controls a partial selection.
Card
Wrap it in a Label and style with has-[[data-state=checked]].
API Reference
Checkbox
Extends Radix Checkbox.Root.
| Prop | Type | Default |
|---|---|---|
checkedControlled state. | boolean | "indeterminate" | — |
defaultCheckedUncontrolled initial state. | boolean | "indeterminate" | false |
onCheckedChangeCalled when the state changes. | (checked: boolean | "indeterminate") => void | — |
disabledPrevents interaction. | boolean | false |