Mobile › Inputs
Slider
Picks a value in a range by dragging. Arrow keys and screen-reader swipes adjust it too.
Installation
npx expo install plankui-mobile react-native-safe-area-context expo-hapticsUsage
import { Slider } from "plankui-mobile";
const [volume, setVolume] = useState(60);
<Slider value={volume} onChange={setVolume} accessibilityLabel="Volume" />iOS and Android
iOS: A thin track with a large white thumb, like Control Centre.
Android: Material 3 slider: a thick track and a narrow handle.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | Current value. | |
| onChange | (v: number) => void | Called while dragging. | |
| min | number | 0 | Lowest value. |
| max | number | 100 | Highest value. |
| step | number | 1 | Increment. |
| accessibilityLabel | string | What the slider sets. | |
| disabled | boolean | false | Dims and blocks dragging. |