Brand Guide

Components

Slider

Picks a number or a range on a scale, such as years of experience or salary.

Default

The fill runs from the start of the track to the thumb, and the value above updates as it moves.
Years of experience6

Range

Two values draw two thumbs with the fill between them. The thumbs can meet, and one dragged past the other takes its place.
Salary expectation£95k – £130k

With steps

SliderSteps puts labels 8px under the track. The first and last line up with the track's ends.
Years of experience10

Not set

unset is for no answer yet: no fill, and the thumb waits at the start with the rest border. Pass a value at min alongside it.
Minimum base salaryNot set

Invalid

Only when the slider is required and still not set. The thumb's border turns red and the message sits 8px below the track.
Minimum base salaryNot set

Disabled

The slider dims to 50% by itself. Dim its label row to match.
Years of experience6

With exact figures

For money, two fields so people can type an exact figure. The slider and the fields stay in step, and a typed figure is rounded and bounded when the field is left.
Salary expectation£95k – £130k

Best practices

  • Use a slider for picking a number or a range on a scale, such as years of experience or salary.
  • Always show the value above the track, in a row with the label on the left and the value on the right.
  • The value is always a list: one number for a single thumb, two for a range.
  • Name the slider with aria-label. A range adds "minimum" and "maximum" to it for each thumb; pass thumbLabels to name them yourself.
  • Focus marks the thumb, not the track. Arrow keys move one step, Page Up and Page Down move ten, and Home and End go to the ends.
  • A slider with no answer yet takes unset, and the value reads "Not set". It only errors when it is required and still not set.
  • For money, add fields beside the slider so people can type an exact figure.