# Slider and Range Slider

A slider selects an approximate value along a bounded scale, while a range slider uses two values to define an interval.

- Type: framework
- Domain: Experience & interface
- Level: Intermediate
- Last reviewed: 2026-10-06
- Original: [Soroush’s Product Wiki](<https://wiki.soroush.uk/topic/slider-and-range-slider/>)

## What it means

A slider lets users move a thumb along a track between a minimum and maximum value. A range slider uses two thumbs to choose lower and upper bounds. Both require a defined step, current value, orientation, and understandable value text; they are not a substitute for precise unrestricted numeric entry.

## Why it matters

Sliders make bounded tradeoffs and relative position visible, but they can be difficult to operate precisely with touch, keyboards, or assistive technology. Exposing values and alternatives keeps the compact control usable.

## When to use it

Use a slider when the range is bounded, relative adjustment matters, and approximate selection is acceptable, such as volume or a price filter. Use a numeric input for precise values, unknown bounds, or large ranges, and provide linked inputs when both scanning and precision matter.

## How it works

1. Define minimum, maximum, step, default, units, and whether one value or an interval is required.
2. Label the control and show the current value or both range endpoints in understandable text.
3. Support arrow keys, larger-step keys where useful, track activation, and non-drag pointer input.
4. For two thumbs, prevent ambiguous crossing and identify each endpoint separately.
5. Test precision, touch assistive technology, keyboard input, zoom, localization, and extreme values.

## A practical example

A marketplace price filter uses a two-thumb range slider from £0 to £500 plus editable Minimum and Maximum fields. Moving either thumb updates the corresponding field, typed values update the slider, and results refresh only after a short pause to avoid excessive requests.

## Where it breaks

Small tracks make fine values hard to choose, range thumbs can overlap, and visual position may not convey nonlinear scales. Custom sliders have uneven touch-assistive-technology support and require substantial testing.

## Common mistakes

- Using a slider when users need an exact value but showing no numeric input.
- Omitting units, current value, or meaningful value text.
- Requiring a dragging movement with no tap, key, or input alternative.
- Giving two range thumbs indistinguishable names or behavior.

## Sources

1. [Slider Pattern](<https://www.w3.org/WAI/ARIA/apg/patterns/slider/>) — W3C Web Accessibility Initiative · Technical guidance
2. [Range slider](<https://designsystem.digital.gov/components/range-slider/>) — U.S. Web Design System · Institutional design system

## Related topics

- [Spinbutton and Numeric Input](<https://wiki.soroush.uk/topic/spinbutton-and-numeric-input/>)
- [Form Validation](<https://wiki.soroush.uk/topic/form-validation/>)
- [Touch Target](<https://wiki.soroush.uk/topic/touch-target/>)
