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.
Download Markdown (.md)Soroush’s Product Wiki · https://wiki.soroush.uk/topic/slider-and-range-slider/
01What 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.[1][2]
02Why 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.
03When 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.
04How it works
- Define minimum, maximum, step, default, units, and whether one value or an interval is required.
- Label the control and show the current value or both range endpoints in understandable text.
- Support arrow keys, larger-step keys where useful, track activation, and non-drag pointer input.
- For two thumbs, prevent ambiguous crossing and identify each endpoint separately.
- Test precision, touch assistive technology, keyboard input, zoom, localization, and extreme values.
05A 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.
06Where 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.