Brand Guide

Components

Checkbox

A yes or no choice, or one of several options that can be picked together.

Default

With a description

The label goes medium and a muted description sits under it.

Show me day-rate and fixed-term roles as well as permanent ones.

Group

A question and a hint above a stack of options, 12px apart.
Which roles should Dex look for?

Choose all that apply.

Indeterminate

A dash instead of the tick, for a box that stands for a group that is partly selected.

Invalid

The border turns red and the message lines up with the label.

Invalid group

Every box takes the red border, with one message under the group.
How do you want to work?

Disabled

Best practices

  • Use a checkbox for a yes or no choice, or for picking several options from a list. For exactly one option use a radio group, and for a setting that applies straight away use a switch.
  • Every box has a label, joined to it with id and htmlFor so pressing the label ticks the box. The label sits 12px from the box and takes font-normal unless a description follows it.
  • A group sits in a FieldSet with its question as the FieldLegend. Set invalid on the FieldSet, not on each box, and put one message under the group.
  • A single required box takes aria-invalid itself, and its message lines up with the label, not the box.
  • indeterminate is for a parent box whose group is partly selected. It is a prop of its own, not a value of checked.
  • A disabled box that is ticked keeps its fill, so it still shows the value.