Skip to main content
v7

Slider

Select one value or a range by sliding. Dragging past either end stretches the track like rubber, and marks act as detents.

Package@g4rcez/componentsSectionForm Controls

Examples

Basic Range Slider

A slider with two thumbs allowing selection of a range between a minimum and maximum value.

Elastic volume with icons

Drag past either end to feel the track stretch and spring back with your release speed. The thumb swells while held and the value tag, which sways with the thumb's speed, appears on hover, focus or drag.

Volume

Marks as detents

Marks are soft snaps: a dragged thumb holds on each one for about seven pixels and the tick pops, with a short vibration where the device supports it. They never block the values in between. Labelled marks print under the track and can be pressed. onValueCommitted fires when you release, press a key or press a label.

Playback speed

Release the thumb to commit.

Range with marks and no stretch

Ranges keep every Base UI prop. Set elastic to false to turn the rubber band off; reduced motion turns it off on its own.

Price range

Brightness

A single value with icons at both ends and a tag. The icons are decoration: the slider conveys the value.

Brightness

When to use Slider

Use when

Use Slider for one continuous value where feel matters, like volume, brightness, zoom or playback speed, or for a range with two thumbs. Use marks for common targets.

Avoid when

Avoid it for exact numeric entry, where an Input fits, and for a handful of discrete choices, where Radiobox or Tabs fit.

Accessibility

Each thumb is a native range input, so it is a slider with its value, minimum and maximum. Pass label to name it (a range numbers its thumbs) and formatValue to give aria-valuetext a unit. Arrows move one step, Shift+Arrow, PageUp and PageDown move by largeStep, Home and End jump to the limits, and at a limit the track stretches toward the key and snaps back. Icons, the value tag and mark labels are hidden from assistive technology.