Skip to main content
  1. Docs
  2. Components
  3. Forms

Checkbox

Yes or no, or several of a list. It waits for the form's Save; the whole row is the target.

Import
@qeetrix/react
Status
StableSince 0.0.2
Renders
<span role="checkbox">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

When to use

Use it for
  • Agreeing, or a yes-or-no saved with the form.
  • Several answers to one question.
  • Selecting all, with a parent checkbox.
Not for
  • A setting that applies at onceSwitch
  • One answer from a fewRadio
  • A tool that's on or offToggle

02

Anatomy

  1. 1checkbox<div>The row: its <label> makes all of it the target, at least 24px tall.
  2. 2checkbox-indicator<span role="checkbox">The 16px box.
  3. 3checkbox-mark<span>A sharp tick, or a dash while mixed.

03

Do and don't

Checked means yes
DoThe label says what checking it does.
Don'tA negative: checked means no.
A group asks its question
DoThe group's label is the question; the boxes, its answers.
Don'tLoose boxes: answers to what?

04

Content

  • Labels say what checked means, in the positive.
  • A group's label is a question or a heading: "Tell me about".
  • Say why an option is disabled, in its description.
Next — CheckboxAPI