Components

Slider

Interactive control for selecting a value or range from a continuous scale

Preview

Volume

Installation

Usage

Children Layout

Children render above the track, not below. This enables the common pattern of a header row (SliderLabel + SliderValue side by side) sitting directly above the slider control:

If you want content below the track, render it as a sibling of the Slider instead of a child — for example, a <FieldDescription> inside the enclosing <Field>.

Examples

Controlled

Manage slider state externally.

Controlled
50

Range Slider

Select a range with two handles.

Price range

With Steps

Snap to discrete step values.

Step: 25

With Value Display

Show the current value alongside the slider.

Progress
75

Vertical Orientation

Display slider vertically.

Variants

Apply different visual styles.

With Reference Scale

Render annotations (like a reference scale) as a sibling of Slider — content outside the Slider root doesn't need the slider's context, so it avoids the label/value composition rules. A SliderLabel child keeps the visible label above the track.

Storage size
5 GB20 GB35 GB

Disabled State

Prevent interaction with disabled slider.

Form Integration

Slider works with two submission flows. With Base UI's onFormSubmit, values come from registered Fields — wrap each slider in <Field name="..."> (and compose with Fieldset for multi-thumb groups so each thumb keeps its own aria-label under a shared legend). With a native onSubmit, Slider's hidden input makes name sufficient on its own. The example below shows both. See the Forms guide for more patterns.

Using onFormSubmit — wrap each slider in Field.

Volume
50
Price range
20 – 80

Using native onSubmit — put name directly on Slider.

Volume
50

API Reference

Slider

Prop

Additional Props

Slider inherits all props from Base UI Slider, including orientation, step, value, defaultValue, onChange, and accessibility props.