TrademarkTrademark
Docs
Ctrl k
Search docs...
Form Controls

Slider

Updated: October 18, 2026
View on GitHub
Soon
Not released yet. This is on main and is not in any published version yet. It will not install today.

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 onChange to own the state. onChange 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 ariaLabel 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 ariaLabel 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 onChange.
defaultValuenumberminThe starting value when the slider keeps its own state.
onChange(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.
ariaLabelstringThe accessible name, when there is no label.
styleViewStyleStyle for the outer view.
Edit this page on GitHub
TrademarkTrademark
Built with curiosity by Lorant One and the Design Engineers Club