Checkbox
Bare checkbox with no label, used for table-row selection and as the base for CheckboxField and CheckboxGroup.
Props
Checkbox extends ButtonHTMLAttributes<HTMLButtonElement>. Renders as role="checkbox" with aria-checked.
| Prop | Type | Default | Description |
|---|---|---|---|
checked | boolean | — | Checked state. |
onChange | (checked: boolean) => void | — | Toggle handler. |
indeterminate | boolean | — | Renders the mixed dash, aria-checked='mixed'. |
size | "sm" | "md" | "sm" | sm for table rows, md for standalone form rows. |
disabled | boolean | — | Prevents interaction. |
Examples
Checked / unchecked
Indeterminate
Sizes
Disabled
Interactive
import { Checkbox } from "@solarius/onset";
import type { CheckboxProps } from "@solarius/onset";