Skip to content
TrademarkTrademark
Docs
Components

Slider

Updated: October 11, 2026
View on GitHub

The Slider component provides an intuitive way to select a value from a range using a draggable thumb along a track.

Uncontrolled

Without value, Slider keeps its own state and starts at defaultValue, or at min when there is none. onChange is optional then: give the slider a name and a form submits its value, or read it from a ref.

For two thumbs that select a range, use RangeSlider.

Label

Add a descriptive label to the slider using the label prop.

Show value

Display the current value alongside the label using showValue.

Step

Control the granularity of value changes with the step prop.

Min and max

Define custom minimum and maximum values for your use case.

Disabled

Disable the slider to prevent user interaction.

API reference

Type
Default
value
The value, when the host owns the state. Pair with onChange.
number—
defaultValue
Where the slider starts when it keeps its own state. Defaults to min.
number—
onChange
Called with the new value, as a number.
(value: number) => void—
min
number0
max
number100
step
number1
label
Visible label that names the slider.
string—
showValue
booleanfalse
disabled
booleanfalse
className
string—
style
React.CSSProperties—
…and every React.InputHTMLAttributes propinherited—
Edit this page on GitHub