Checkbox
Checkbox toggles a single boolean. It also supports an indeterminate state
for "some but not all," like a parent controlling a group.
Usage
import { Checkbox } from "@sina-design-system/core";
<Checkbox checked={agreed} onCheckedChange={setAgreed} label="I agree" />
<Checkbox checked="indeterminate" label="Select all" />Examples
States
unchecked
checked
indeterminate
disabled
With label
Controlled
Props
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | "indeterminate" | — | Controlled checked state. Pass "indeterminate" for the mixed state. |
onCheckedChange | (checked: boolean | "indeterminate") => void | — | Fires on toggle. |
label | ReactNode | — | Associated label. |
Accessibility
Space toggles; the label is clickable; the state is announced as checked,
unchecked, or mixed.