Skip to content

Checkbox

Selects any number of options, with checked, unchecked and indeterminate states.

import { Checkbox } from '@windmorph/react';

Purpose

Checkboxes let people select any number of options from a set, or turn a single option on or off. Use a Switch for an immediate on/off setting, and a RadioGroup when only one choice in a set is allowed.

A checkbox needs an accessible name — give it label children, or an aria-label / aria-labelledby when there is no visible text (the types enforce one).

When not to use

For a single setting that takes effect immediately use a Switch; for one choice from a set use a Radio group.

See also

  • Checkbox on m3.material.io: Material's own guidelines, with anatomy and specs.
  • Switch: Toggles a single setting on or off, with optional icons in the thumb.
  • Radio group: A set of radio buttons for picking exactly one option; a Radio needs a RadioGroup.