Checkbox

A labelled, form-associated checkbox that emits change events and binds to a form via name / value. For the bare square without a label, use the sc-checkbox-item primitive.

Install

Examples

States

indeterminate represents a partially-selected parent in a checkbox tree.

Unchecked Checked Indeterminate

Validation

Set state to negative or positive to reflect form validity. Add required for native constraint validation.

Please accept the terms Verified

Disabled

Unchecked Checked

sc-checkbox-item primitive

The standalone checkbox visual — just the square and tick, with no label or form association. Reach for it in custom layouts (cards, list items) where you own the surrounding markup.

Guidelines

Usage

multi-select options, terms acceptance, and labelled settings that need form binding. For a single on/off setting, consider a Toggle; for mutually exclusive choices, use Radio.

Do

  • Write a clear, positive label — the statement is true when checked.
  • Use indeterminate only for a parent summarising mixed children.
  • Reach for sc-checkbox in forms so it binds and validates.

Don’t

  • Don’t use a checkbox for one mutually exclusive choice — use Radio.
  • Don’t use the bare sc-checkbox-item without your own label and form wiring.
  • Don’t phrase labels as negatives — “Don’t send emails” is hard to parse when checked.

Accessibility

Properties

Related