Skip to main content

Figma Storybook

Range Slider

Allows users to select a numeric value or range by dragging a handle along a track. Use for bounded numeric input where approximate values are acceptable. Don't use when an exact value is required — use Input instead.

Figma Storybook Docs

Description

What it does

Lets users select a single value or a min–max range within a defined boundary by dragging one or two handles along a horizontal track.

Where it appears

Filter panels, report configuration screens, and consultation setup forms where users narrow down data by a numeric dimension — for example, filtering stakeholders by engagement score, or setting a budget range for a consultation project.

Why it exists

Many government datasets have continuous numeric dimensions (population counts, satisfaction scores, date offsets) where users need to explore a range rather than enter a precise figure. A slider communicates the bounded nature of the input at a glance and reduces cognitive load compared to a pair of text inputs.

Dependencies

Input, Label, Helper Text

Anatomy

PartRequired?Notes
Track Required Horizontal bar representing the full available range. Background uses --op-color-border-default; filled portion uses --op-color-interactive-default.
Handle (thumb) Required Draggable circular control. Minimum 44×44 px touch target. Receives focus ring on keyboard focus.
Fill Required Coloured segment of the track between the minimum value (or track start) and the handle, or between two handles in a range slider.
Label Required Visible text label above the slider. Must not be replaced by placeholder or tooltip alone.
Value display Recommended Shows the current selected value(s) inline, either adjacent to the label or as a floating tooltip above the active handle. Required when the value is not immediately obvious from context.
Min / Max indicators Optional Static text or icons at each end of the track showing the boundary values. Helps orient users in contexts where the scale is not self-evident.
Tick marks Optional Discrete step markers along the track. Use only when the slider is constrained to a small set of meaningful steps (e.g. 1–5 satisfaction rating).
Helper text Optional Supplementary guidance below the slider. Styled with --op-color-text-secondary.
Error message Optional Validation message shown in error state. Uses --op-color-status-error and is associated via aria-describedby.

Variants

Single value

Selects one point on a continuous scale

Use when the user sets a single threshold or target — for example, a minimum engagement score filter or a confidence level threshold.

Range (dual handle)

Selects a min–max band on a continuous scale

Use when the user needs to bound data at both ends — for example, filtering stakeholders by age band or limiting consultation responses to a date offset window.

Stepped

Constrains selection to discrete intervals

Use when only specific values are valid — for example, a 1–10 rating scale or a budget increment of $10,000. Pair with tick marks and a visible step count.

States

State Behaviour
Default Track and handle render at rest; fill shows the current value. Value display reflects the initial or previously saved value.
Hover Handle scales up slightly and cursor changes to a grab cursor. Track fill uses --op-color-interactive-hover. No state change occurs until the user begins dragging.
Focus 3px focus ring using --op-color-interactive-focus appears around the handle. Arrow keys adjust the value by one step. Shift+Arrow adjusts by a larger increment (10% of range by default).
Active (dragging) Cursor changes to grabbing. Value display updates live. Handle remains elevated visually to signal it is being manipulated.
Disabled Handle and track render at reduced opacity (--op-color-text-disabled). No interaction is possible. Avoid disabling without explanation — use helper text or a visible reason.
Error Track border and handle outline use --op-color-status-error. Error message appears below the slider. Occurs when a submitted value falls outside a required range defined by business rules.
Read-only Value is visible but the handle cannot be moved. Use when the slider displays a stored value the current user cannot change (e.g. a locked consultation parameter set by an admin).

Usage guidelines

When to use

  • Filtering a stakeholder list by a continuous metric such as engagement score, influence rating, or number of interactions.
  • Setting a confidence threshold for automated stakeholder categorisation.
  • Configuring a consultation parameter that has a known bounded range (e.g. number of response options: 2–10).
  • Letting a community member indicate a preference on a satisfaction or priority scale where approximate values are meaningful.

When not to use

  • When an exact numeric value is required — use an Input with type="number" instead, optionally paired with increment/decrement controls.
  • When the range is very large or unbounded (e.g. entering a population count from 0 to 10 million) — the precision needed makes a slider impractical.
  • When there are only two or three discrete options — use a Radio Group instead.
  • When the value must be validated to a strict format (e.g. a dollar amount with cents) — use Input.

Do / Don't

Do

Always show the current value numerically alongside the handle or label so users do not have to estimate.

Don't

Rely on the handle position alone to communicate the selected value — small track widths make this ambiguous.

Do

Provide min and max boundary indicators when the scale is not self-evident from context.

Don't

Omit boundary values on scales that are not universally understood (e.g. an internal scoring model from 0–850).

Do

Use stepped sliders with tick marks when selection must align to meaningful discrete values.

Don't

Apply tick marks to continuous sliders with many possible values — the visual noise adds no meaning.

Do

Write a clear label that names what is being adjusted, e.g. 'Minimum engagement score'.

Don't

Use vague labels like 'Value' or 'Amount' without context.

Do

Ensure the touch target for each handle is at least 44×44 px, even if the handle appears visually smaller.

Don't

Reduce handle size for aesthetic reasons without verifying the touch target remains accessible.

Was this page helpful?

Updated 9 September 2026