Mobile › Inputs
Stepper
Minus and plus buttons for small counts, such as guests or quantity.
Installation
npx expo install plankui-mobile react-native-safe-area-context expo-hapticsUsage
import { Stepper } from "plankui-mobile";
const [guests, setGuests] = useState(2);
<Stepper value={guests} onChange={setGuests} min={1} max={8} accessibilityLabel="Guests" />iOS and Android
iOS: The iOS stepper: two halves of one grey capsule.
Android: An outlined pill with the count between minus and plus.
API reference
| Prop | Type | Default | Description |
|---|---|---|---|
| value | number | Current count. | |
| onChange | (v: number) => void | Called with the new count. | |
| min | number | 0 | Lowest count; minus disables there. |
| max | number | 99 | Highest count; plus disables there. |
| step | number | 1 | Increment. |
| accessibilityLabel | string | What it counts. |