# Stepper — React Native component for Expo

> A quantity stepper whose digits roll up or down as the number changes.

Quantity control whose number rolls — each changed digit slides out as the new one slides in, up or down with the change. Airbnb-style outline, an iOS-style filled capsule, a compact row control, and a DoorDash-style cart button that springs open from a single + into − 1 + (with a trash can at 1). Buttons spring on press, hold to repeat with acceleration, and pushing past a limit gives a little bump.

- Docs: https://expokit.in/docs/components/stepper
- Tier: Free
- Also called: quantity stepper, number input with plus and minus, counter
- Category: Inputs
- Platforms: iOS, Android, web
- Expo Go: yes, no development build needed
- npm dependencies: react-native-svg
- Uses ExpoKit items: kit
- Variants: Cart, Guests, Add To Bag, Menu, Formatted, Sizes, Colors

## Installation

Run once per project: `npx @expokit/cli@latest init` (shared theme + KitProvider). Then:

```bash
npx @expokit/cli@latest add stepper
```

The CLI copies the source into your project (you own the code) and installs react-native-svg.

Import: `import { Stepper } from "@/components/ui/stepper";`

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `value / defaultValue` | `number` | `min or 0` | Controlled or uncontrolled value. |
| `onValueChange` | `(value) => void` | — | Called on every step. |
| `min / max` | `number` | `0 / ∞` | Limits; the matching button dims and a press past it bumps the number. |
| `step` | `number` | `1` | Increment (decimals are respected, e.g. 0.5). |
| `variant` | `"outline" \| "filled" \| "cart" \| "compact"` | `"outline"` | Round outlined buttons, one tinted capsule, an accent cart button that collapses to + at 0, or small tinted buttons. Old names still work: default → outline, pill / segmented → filled, vertical → filled + vertical. |
| `size` | `"sm" \| "md" \| "lg"` | `"md"` | 32 / 36 / 44pt buttons (touch area always ≥ 44pt); the number and icons scale too. compact is always 28pt. |
| `orientation` | `"horizontal" \| "vertical"` | `"horizontal"` | Stack + / number / − (outline, filled, compact). |
| `format` | `(value) => string` | — | Display format, e.g. currency; every changed character rolls. |
| `suffix` | `string \| (value) => string` | — | Muted unit after the number: "kg", or (n) => n === 1 ? "night" : "nights". |
| `addLabel` | `string` | — | cart: text beside the + while collapsed, e.g. "Add". |
| `repeat` | `boolean` | `true` | Hold to keep stepping, speeding up. |
| `label` | `string` | — | Title on the left; the control moves to the right edge. |
| `description` | `string` | — | Muted line under the label. |
| `disabled` | `boolean` | `false` | Dims and blocks the control. |
| `accent` | `string` | `theme accent` | Icons (filled, compact), press tint (outline), fill (cart). |
| `iconColor` | `string` | — | Overrides the − / + icon colour. |
| `accessibilityLabel` | `string` | `label` | Read by screen readers; the control is adjustable (swipe up / down). |
| `style` | `StyleProp<ViewStyle>` | — | The control, or the whole row when label / description is set. |
| `className` | `string` | — | Tailwind classes on the root when using NativeWind or Uniwind. Prefer style for StyleSheet overrides. |
| `buttonStyle` | `StyleProp<ViewStyle>` | — | Applied to each − / + button. |
| `valueStyle` | `StyleProp<TextStyle>` | — | Applied to the number (fontSize, colour, weight). |

## Behaviour & accessibility

- **Touch**: Hold a button to keep stepping, speeding up as you hold. The cart variant opens from a single + into − 1 +, with a trash can at 1.
- **Motion**: Each changed character slides out as the new one slides in; buttons spring on press and a press past min or max gives a small bump.
- **Screen readers**: One adjustable element with min, max and the formatted value (suffix included), plus 'Increase' and 'Decrease' actions.

## FAQ

### How do I make a quantity stepper in React Native?

Use ExpoKit's Stepper: run npx @expokit/cli@latest add stepper in your Expo or React Native project and it copies a ready-made quantity stepper into your app as plain TypeScript you can edit. It works on iOS, Android and web, and in Expo Go.

### Does Stepper work in Expo Go?

Yes. Stepper runs in Expo Go on iOS and Android with no development build — its packages (react-native-svg) are all included in Expo Go.

### How do I add Stepper to my Expo app?

Run npx @expokit/cli@latest add stepper in your project. The CLI copies the component's source into your app and installs react-native-svg, so the code is yours to change.

### Is Stepper free?

Yes. Stepper is free: its full source is on this page and the CLI installs it without an account.

### Can I change how Stepper looks?

Yes. It takes its colours, radius and light / dark mode from useKit(), so wrapping your app in <KitProvider accent radius> re-skins it with every other ExpoKit component. The code lives in your project, so you can also edit anything directly.

## More

- Live preview, variants and code: https://expokit.in/docs/components/stepper
- Every ExpoKit component, screen, template and chart: https://expokit.in/llms.txt
- Install commands and props for every free component: https://expokit.in/llms-full.txt
- Pricing: https://expokit.in/pricing
