Checkbox

Binary toggle for forms, with indeterminate support

Category: inputs · WCAG 2.2-AA · form, toggle, boolean

States

Props

PropTypeDefaultDescription
labelstringText label for the control.
checkedbooleanWhether the control is checked (controlled).
indeterminatebooleanfalseWhen true, renders the mixed/indeterminate state.
disabledbooleanfalseWhen true, disables the control and removes it from the tab order.
onChangeReact.ChangeEventHandler<HTMLInputElement>Called when the value changes.
ariaLabelstringInvisible accessible name, for when a visible element outside this component already labels it and `label` would render that text a second time. ⚠ `label` on this component is **visible**; `IconButton.label`/`Sparkline.label` are invisible names, which is the prior that costs adopters a duplicated label. The raw DOM `aria-label` still wins over this.

Design tokens

When to use

When not to use

How to build an accessible Checkbox in React →

Examples

With label

<Checkbox label="Accept terms" />

Indeterminate

<Checkbox label="Select all" indeterminate />

Related components

← Back to docs