Components · FormNot verified with Figma

Range

A range lets the user pick one value from an ordered series by dragging a thumb, with the current value shown as text.

Tokens, dimensions, states and requirements. There is no Figma component: values come from the live token package and the specification skill.

Design Tokens

Resolved from the live token package.

StatePartTokenValue

Open points: no Figma component. The sizes were decided in code. No dark-mode variant.


Sizes

PartValue
Hit area24px high input
Track2px, border-primary
Thumb16px circle, surface-100
Hover halo4px, surface-opacity-black-12
Labellabel-sm: 14/20, 0.28px, weight 600
Valuebody-sm: 14/20, 0.36px
Ticks12/16, 0.3px, text-tertiary

The same on every breakpoint. The 24px hit area is below the usual 44px touch target; raise the input height at xs and sm if design wants it.


Measurements

Dimensions

AttributeValue
Control heightHead row (20px line) + 4px + hit area 24px + 4px + ticks 16px
Hit area24px, full width of the container
Track2px high
Thumb16px circle, centered on the track (7px above the track top)
Halo4px around the thumb, on hover
Focus ring2px line, 2px offset, around the input
CornersRound thumb, square track

A range has no padding of its own, so there is no measurement figure.

Spacing

The gaps between the parts as spacing tokens.

PartValue
Gap between head, input and ticksspace-4
Gap between label and valuespace-8 minimum
Halo, focus ring offset4px and 2px: literals

States

Four states. Enabled and Disabled are shown. Hover and focus come from the browser: hover the thumb for the halo, press Tab for the ring.

StateControlLook

Typography

PartTypeSize / line heightLetter spacingWeight
Labellabel-sm14/200.28px600
Valuebody-sm14/200.36pxRegular
Ticks—12/160.3pxRegular

Breuer Condensed with ss02, ss03 and ss06. The same on every breakpoint.


Structure

Elements

ElementClassNotes
Blockform-range with data-rangeColumn of head, input and ticks. [hidden] hides it.
Headform-range__headLabel on the left, value on the right.
Labelform-range__labelA label with for.
Valueform-range__valueAn output.
Inputform-range__inputThe native range input.
Ticksform-range__ticksOptional. Filled by range.js.

Types

TypeAttributesUse
Named stepsdata-labels, data-ticks, optional data-recommendedAn ordered list of named values.
Numericdata-unitA number between a minimum and a maximum.

Attributes

Attribute on [data-range]Meaning
data-labels="A|B|C"Value text per step, shown right of the label and set as aria-valuetext. Without it the number is shown (plus data-unit).
data-ticks="a|b|c"Tick labels under the track, one per step. Defaults to data-labels. Omit the .form-range__ticks div for none.
data-recommended="1"Step index of the recommended default. Its tick gets a *; explain the * near the control.
data-unit="px"Suffix for numeric ranges without data-labels.

Width

The range fills its container.


Motion

PropertyDurationEasing
box-shadow of the thumb (the halo), hover in and outduration-fast-2ease-standard

Behavior

InputResult
Drag, click the trackMoves the thumb; the value text updates.
Arrow keys, Home, End, PageUp, PageDownNative keyboard control.
TabFocus ring on keyboard focus only.
EventThe normal input event on the <input>. For blocks added later: ECO_RANGE.init(container).
HideThe hidden attribute on the .form-range block.

Accessibility Requirements

TopicRequirement
ElementAlways the native <input type="range">, never a div imitation. Keyboard and screen readers then work for free.
LabelA visible label linked with for and id.
ValueTicks are aria-hidden; the value is read through aria-valuetext.
Focus2px ring border-focus on :focus-visible (WCAG 2.4.7, 1.4.11).
Target sizeThe 24px hit area meets WCAG 2.5.8 (24px) but not the 44px recommendation.
DisabledNot focusable. Disabled tokens are exempt from contrast requirements.