Checkbox
Forms & Input

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.

CheckboxProps props
PropTypeDefaultDescription
checkedboolean—Checked state.
onChange(checked: boolean) => void—Toggle handler.
indeterminateboolean—Renders the mixed dash, aria-checked='mixed'.
size"sm" | "md""sm"sm for table rows, md for standalone form rows.
disabledboolean—Prevents interaction.

Examples

Checked / unchecked

Checked and unchecked

Indeterminate

Indeterminate (tri-state)

Sizes

Size sm vs md

Disabled

Disabled checkbox

Interactive

Interactive checkbox
ImportTSX
import { Checkbox } from "@solarius/onset";
import type { CheckboxProps } from "@solarius/onset";