Skip to content
Gloss v2.0.0
Source
Components

Checkbox

Native checkbox, tinted with the accent color. No hand-drawn box.

Basic

input[type="checkbox"] is the component — styled bare with accent-color rather than a custom box, so the browser draws its own check. This is a real reduction, not just a rename: it deletes the hand-drawn SVG-checkmark markup that a .gl-choice__box span used to need. The wrapping <label> is told apart from Field’s label structurally — it :has() a checkbox as a direct child — so it needs no class either.

Checkbox
Markup
<label>
  <input type="checkbox" />
  Notify me
</label>
<label>
  <input type="checkbox" checked="" />
  Ship on merge
</label>

Disabled

Disabled
Markup
<label>
  <input type="checkbox" disabled="" />
  Not available on this plan
</label>

In a fieldset

<fieldset>/<legend> are styled bare too — they already mean this.

Fieldset
Notify me about
Markup
<fieldset>
  <legend>Notify me about</legend>
  <label>
    <input type="checkbox" checked="" />
    Overdue tasks
  </label>
  <label>
    <input type="checkbox" />
    Weekly digest
  </label>
</fieldset>

API

Element / attributeValuesNotes
input[type="checkbox"]Required base — no class. Tinted with accent-color.
checkedboolean
disabledboolean
labeltext contentWrap the input directly — label:has(> input[type="checkbox"]) is what applies the row layout.