Skip to content
Components

Checkbox

Renders a checkbox input with support for checked, unchecked, and indeterminate states.

Usage

import { Checkbox, CheckboxProps } from "@instruments/materia-ui/components/checkbox";

Best practices

  • A bare Checkbox has no label - pair it with a Label (htmlFor) or use CheckboxField, which wires id/htmlFor/aria-describedby for you.

  • Set the mixed state via the indeterminate prop; checked stays a boolean.

  • Controlled use needs checked + onCheckedChange together; passing only checked freezes the box - use defaultChecked for uncontrolled.

  • For a selectable card or a label+description row, reach for CheckboxCardGroup/CheckboxField instead of hand-laying-out around Checkbox.

Props

PropTypeDefaultDescription
sizeResponsiveSize"xs"

Checkbox size - a single token or a per-breakpoint object like { base: "sm", md: "lg" }.

Also exports

  • typeCheckboxProps

Composition