Skip to content

Search Feitio

↵ opens the first↑↓ chooseEsc closes

Checkbox

A box to tick: yes or no for one thing, or several choices in a group.

On this page

Playground

State
Background
HTML
<label class="feitio-choice"><input type="checkbox">Notify on Discord</label>

When to use

When not to use

Examples

Notify byTick as many as you like

A group

Title and hint together (space-1), the options right below (space-3), and space-2 between options. The tick is in ink: orange stays for the main action.

Show code
HTML
<fieldset class="feitio-fieldset">
  <legend class="feitio-label">Avisar por</legend>
  <span class="feitio-hint">Marque quantos quiser</span>
  <div class="feitio-choices">
    <label class="feitio-choice"><input type="checkbox" name="avisar" value="discord" checked>Discord</label>
    <label class="feitio-choice"><input type="checkbox" name="avisar" value="email">E-mail</label>
  </div>
</fieldset>

States

Unticked
Ticked
Group error
Notify by
Pick at least one
Disabled

Do and don’t

Do

Box and text clickable together, and the tick in ink.

Don’t

Orange ticks compete with the save button for the orange.

Accessibility

Attributes

AttributeValuesWhat for
class="feitio-choices"around the optionsspace-2 between options.
class="feitio-choice"on the <label>Box and text clickable together.
checked, disabled—Ticked; disabled.
aria-invalid="true"on the fieldsetGroup error, below the options.
Top