Slider

Slider for picking a value or a range on a scale, in a cell of a settings list.

import { Slider } from "@plexui/react-native"

Examples

Overview

Labels over the track

In a settings group

Platforms

iOS 26Android
Native componentSliderSlider
LookA thin track with a white capsule thumbA 3dp track with a small round thumb in the accent

API

PropTypeDefaultDescription
valuenumber | number[]—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
rangebooleanfalseA thumb for each value of an array
minnumber0The least value
maxnumber100The greatest value
stepnumber1The value snaps to multiples of it from min
ticksboolean | number[]falseA 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
minStepsBetweenThumbsnumber0With range: the fewest steps between two thumbs
labelReactNode—The label over the slider, with the value at its end
unitstring—A unit after the value (%)
prefixUnitstring—A unit before the value ($)
hideValuebooleanfalseHides the value beside the label
resetValuenumber—One thumb only: a value offered back by a reset button beside the value, shown while the value is another
resetTooltipstring"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
startAdornmentReactNode—A symbol at the start of the track. Horizontal only
endAdornmentReactNode—A symbol at the end of the track. Horizontal only
trackColorstring—Color of the track's inactive part
rangeColorstring—Color of the track's active part
disabledboolean—Dims the slider and takes no presses
aria-labelstring—Name for assistive technology when there is no text label
testIDstring—Test id
styleStyleProp<ViewStyle>—Style of the slider's outer box