The value (required); an array of values with range
onChange
(value: number | number[]) => void
—
Called with the new value as a thumb moves (required); an array with range
onChangeEnd
(value: number | number[]) => void
—
Called once the finger lets go, with the last value
range
boolean
false
A thumb for each value of an array
min
number
0
The least value
max
number
100
The greatest value
step
number
1
The value snaps to multiples of it from min
ticks
boolean | number[]
false
A mark at each step. iOS: a 3pt dot 8.5pt under the track at each step, where the steps are 9pt or more apart (horizontal only); the ticks hold the thumb and it runs to each new step on a spring, as iOS 27.2's do. Android draws no dots, the thumb snapping to each step; an array of values puts the dots at those values only
minStepsBetweenThumbs
number
0
With range: the fewest steps between two thumbs
label
ReactNode
—
The label over the slider, with the value at its end
unit
string
—
A unit after the value (%)
prefixUnit
string
—
A unit before the value ($)
hideValue
boolean
false
Hides the value beside the label
resetValue
number
—
One thumb only: a value offered back by a reset button beside the value, shown while the value is another
resetTooltip
string
"Reset to default"
Accessible name of the reset button
marks
{ value: number; label: string }[]
—
Labels over the track; on iOS 15/20, the ends 5pt in from the track's ends. Horizontal only
orientation
"horizontal" | "vertical"
"horizontal"
A vertical slider is 200pt tall, label included, the minimum at the bottom
startAdornment
ReactNode
—
A symbol at the start of the track. Horizontal only
endAdornment
ReactNode
—
A symbol at the end of the track. Horizontal only
trackColor
string
—
Color of the track's inactive part
rangeColor
string
—
Color of the track's active part
disabled
boolean
—
Dims the slider and takes no presses
aria-label
string
—
Name for assistive technology when there is no text label