Skip to content

Slider

Expressive

Chooses a value or a range on a continuous or stepped scale, in five sizes.

import { Slider, RangeSlider } from '@windmorph/react';

Purpose

Sliders let people choose a value, or a range with RangeSlider, from a continuous or stepped scale — volume, brightness, a price band. Reach for a TextField when an exact number matters more than quick adjustment.

A name is required: pass an aria-label or aria-labelledby. The value is controlled through value / onChange (and onChangeEnd) or uncontrolled with defaultValue.

When not to use

When a precise value matters, use a Text field; for a few discrete options use a Radio group.

See also

  • Slider on m3.material.io: Material's own guidelines, with anatomy and specs.
  • Text field: Filled or outlined text input with a floating label, icons, affixes, counter, error icon and a text area.
  • Media time slider: A media player's position bar: where playback is, what has loaded, and the time under the pointer, to seek by pointer, touch and keyboard. Not an M3 component (@windmorph/react-pro).