Skip to content

Component · 05

Checkbox

Built on Base UI for correct keyboard, mixed-state and form behaviour, drawn in the same stamped style. It presses into the page when you click it.

With a label

Click the text or the box. Space toggles it from the keyboard.

tsx
<Checkbox label="Email me product updates" />
<Checkbox label="Remember me" defaultChecked />

States

tsx
<Checkbox label="Select all" indeterminate />
<Checkbox label="Disabled" disabled />
<Checkbox label="Disabled, checked" disabled defaultChecked />

Without visible text

No label prop means you must name it yourself.

tsx
<Checkbox aria-label="Select row 3" />

Props

PropTypeDefaultDescription
labelReactNode-Wraps the box in a <label> so the text toggles it and names it. Without it, pass aria-label.
checked / defaultCheckedbooleanfalseControlled / uncontrolled state.
onCheckedChange(checked, details) => void-Fires when the user toggles it.
indeterminatebooleanfalseMixed state, announced as aria-checked=mixed.
disabled / readOnly / requiredbooleanfalseAs in a native checkbox.
name / valuestring-Submitted with the surrounding form when checked.
classNamestring-With a label: applied to the wrapper. Without: to the box.