This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
Slider
A control for selecting a value from a continuous or stepped range.
A controlled slider for selecting a numeric value within a range. Pair value with onValueChange to manage state from React.
Installation
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Continuous slider
The default range is [0, 1].
Stepped slider with custom range
Use min, max, and step to constrain the values produced by the slider.
API
import { Slider } from '@expo/ui';
Component
Type: React.Element<SliderProps>
A control for selecting a value from a continuous or stepped range.
Props for the Slider component.
booleanWhether the slider is disabled. Disabled sliders do not respond to user interaction.
ModifierConfig[]Platform-specific modifier escape hatch. Pass an array of modifier configs
from @expo/ui/swift-ui/modifiers or @expo/ui/jetpack-compose/modifiers.
(value: number) => voidCalled when the user changes the slider value.
numberIncrement size. For example, step={10} with min={0} and max={100} produces values 0, 10, 20, …, 100.
stringIdentifier used to locate the component in end-to-end tests.