Stepper
Stepper, a React Native component for iOS, Android and web: A number changed in steps.
Usage
import { useState } from 'react';
import { Stepper } from './components/ui/stepper';
export default function Example() {
const [minutes, setMinutes] = useState(25);
return <Stepper label="Focus length" value={minutes} onValueChange={setMinutes} min={5} max={60} step={5} unit="min" />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | ||
value | number | ||
onValueChange | (value: number) => void | ||
min | number | 0 | |
max | number | Number.MAX_SAFE_INTEGER | |
step | number | 1 | |
unit | string | Shown beside the value and read with it, like `min`. | |
style | StyleProp<ViewStyle> | ||
testID | string |