Skip to content
TrademarkTrademark
Docs
Form Controls

Slider

Updated: October 18, 2026
View on GitHub

Slider picks one number between min and max. Drag anywhere on the track and the thumb follows your finger, landing on a multiple of step. Screen readers announce it as an adjustable control and change it by step with a swipe up or down. For a range with two thumbs, use RangeSlider. See the web Slider for the browser version.

Basic usage

Without value the slider keeps its own state, starting at defaultValue (or min). showValue prints the value beside the label.

Controlled

Pass value and update it in onValueChange to own the state. onValueChange gets a number on every step of the drag.

Steps and decimals

step can be a fraction. Values snap to multiples of step from min, without floating-point noise. Use aria-label when there is no visible label.

Differences from the web

  • The thumb follows a drag anywhere on the track, through a PanResponder. Once a drag starts, a scroll view around the slider cannot take it over; a vertical swipe that starts on the slider still scrolls the page.
  • The track has no hover state. The thumb grows while it is dragged, as on the web.
  • There is no hidden <input type="range">, so the native HTML input props (name, id, onInput…) are gone. Use aria-label for the accessible name when there is no label.
  • Screen readers adjust the slider with the platform's increment and decrement actions instead of the arrow keys.

API reference

Prop
Type
Default
Description
valuenumberThe value, when the host owns the state. Pair with onValueChange.
defaultValuenumberminThe starting value when the slider keeps its own state.
onValueChange(value: number) => voidCalled with the new value.
minnumber0The lowest value.
maxnumber100The highest value.
stepnumber1Values land on multiples of this from min.
labelstringA label above the track. It also names the slider.
showValuebooleanfalseShows the value beside the label.
disabledbooleanfalseDims the slider. It ignores drags and actions.
aria-labelstringThe accessible name, when there is no label.
styleViewStyleStyle for the outer view.
Edit this page on GitHub