"use client";
import { Checkbox } from "@pixxl-tools/components";| Prop | Type | Default | Description |
|---|---|---|---|
label | ReactNode | — | Visible label (also the accessible name). |
className | string | — | Goes to the root <label> with style; ref, id and native attributes go to the input. |
indeterminate | boolean | — | Mixed state (a "select all" parent with some children checked). Shown as a dash and exposed as aria-checked="mixed"; clicking still toggles checked, so update indeterminate in onCheckedChange. |
onCheckedChange | ( checked: boolean, event: ChangeEvent<HTMLInputElement>, ) => void | — | Called with the new checked state (and the change event). |
onValueChange | ( value: boolean, event: ChangeEvent<HTMLInputElement>, ) => void | — | Called with the new value (only when it changes). |
size | ComponentSize | — | Box size: 16px (xs, sm), 18px (md, default), 20px (lg). |
labelReactNode
Visible label (also the accessible name).
classNamestring
Goes to the root <label> with style; ref, id and native attributes go to the input.
indeterminateboolean
Mixed state (a "select all" parent with some children checked). Shown as a dash and exposed as aria-checked="mixed"; clicking still toggles checked, so update indeterminate in onCheckedChange.
onCheckedChange( checked: boolean, event: ChangeEvent<HTMLInputElement>, ) => void
Called with the new checked state (and the change event).
onValueChange( value: boolean, event: ChangeEvent<HTMLInputElement>, ) => void
Called with the new value (only when it changes).
sizeComponentSize
Box size: 16px (xs, sm), 18px (md, default), 20px (lg).
Other props are passed to the root element (InputHTMLAttributes<HTMLInputElement>), including className, style, id and aria-* attributes.
Complex object props use fixed fixtures. Primitive props stay editable.
<Checkbox label="Preview" checked={true} disabled={false} /><Checkbox label="Snap" /><Checkbox label="Preview" checked={true} disabled={false} />