Checkbox

A box for a binary choice — on its own, or one of several independently-selectable options in a group. Its value is submitted with a form; when a setting applies immediately instead, use a toggle.

States

Real DOM drivers set every state; demo classes force hover and focus here. One size — size.icon.md. Unchecked hover previews the primary check on the unfilled box; selection reverses it onto the primary fill, which remains filled as it steps to its hover color.

ExampleStateDriverRolesUsage
Rest, uncheckedborder.strongsurface.pageAn empty box, ready to check
Hover:hoversurface.pageaction.primary.bgThe primary check previews selection on the unfilled box
Checked:checkedaction.primary.bg.textA check mark on the primary fill
Checked + hover:checked:hoveraction.primary.hover.textThe fill responds without disguising the selected value
Indeterminate:indeterminateaction.primary.bg.textA dash — some but not all in a group are checked; set via el.indeterminate, not an attribute
Focus:focus-visiblefocus.ringKeyboard focus — the shared ring
Invalid[aria-invalid]status.error.borderPair with an error message via aria-describedby
Disabled:disabledaction.disabled.bgborder.defaultExcluded from interaction and the tab order
Checkbox · Select all
Regions
Choose every region this policy should cover, including disabled regions that remain visible for context.

The native fieldset.ds-choice-group supplies the rounded boundary, inset, legend, and owned help line; Checkbox keeps its square semantics. The "select all" parent reflects its children and loads indeterminate here.

Usage notes

Checkboxes select independently — each answers its own yes/no.

VerdictRule
DoGive every checkbox a label — a visible one via its row, or aria-label when the surrounding text is the label.
DoGroup visibly bounded related choices in fieldset.ds-choice-group under a real legend; each checkbox still toggles on its own.
DoSet aria-invalid with a message referenced by aria-describedby — never color alone.
Don’tReach for a checkbox for mutually exclusive options — that is Radio — or for a setting that applies at once — that is Toggle.