What is a stepper?
A stepper is a control that changes a number by a fixed step (usually 1) with a decrease (−) and an increase (+) button. The value stays between a minimum and a maximum.
You’ll find steppers in:
- Shopping carts: quantity of each product.
- Bookings: guests, rooms, adults/children, nights.
- Recipes and fitness: servings, sets, reps.
- Settings: number of copies to print, reminder minutes.
Anatomy
Oat milk 1 L
Only 4 left
15- 1
Label
What is being counted: "Quantity", "Guests", "Adults". Also the accessible name.
- 2
Decrease button (−)
Lowers the value by one step. Disabled at the minimum, or turns into a trash icon in carts.
- 3
Value
The current number. Sometimes editable, so users can type 12 instead of tapping 11 times.
- 4
Increase button (+)
Raises the value by one step. Disabled at the maximum (stock limit, max tickets).
- 5
Limit hint
Explains why + stopped working: "Only 4 left", "Max 8 guests".
What to know about the value
- Min and max. At the limit, the matching button must be disabled (and look it). Common limits: 1 for a cart line (0 means “remove”), the stock reported by the server, “max 8 guests”, “max 9 travellers in total”.
- Step size. Usually 1, but not always: 0.5 kg of cheese, packs of 6, 15-minute slots. Check the value can’t land between steps.
- Typing. Some steppers let you tap the number and type “12”. Then everything from text fields applies: validation, the keyboard type, what happens to “05”, “1e2”, “-3” or an empty field.
- Long-press. Many steppers repeat while you hold the button and speed up after a while. It must stop at the limit and stop when you let go.
Dev note
iOSUIStepperrepeats by default.
Stepper vs slider vs text field
| Component | Best for | Weak at |
|---|---|---|
| Stepper | Small exact numbers, small changes (1–10) | Big jumps: 1 → 50 needs 49 taps |
| Slider | Rough values in a range (volume, price range) | Exact values |
| Text field (number) | Any exact number, big ranges | Quick +1 changes, limits are invisible |
A good rule: if users usually change the value by one or two, use a stepper. If the value can be large, let users type (an editable stepper or a plain field).
Designs & variants
All of these work. Hold + or − to repeat, and try the editable ones with the keyboard (↑ ↓ Home End).
UIStepper
iOSApple's native stepper: two buttons in a grey capsule, no value inside. The app must show the value in a label next to it.
Oat milk 1 L
€2.49 · 4 in stock
Cart quantity
iOS · Android · WebThe shopping classic. At 1, the − turns into a trash icon, so removing is a clear, deliberate action. + stops at the stock limit.
Outlined buttons
Android · Material 3Material has no stepper component, so Android apps build one from icon buttons and a text. Each team's version behaves a little differently.
Editable quantity
WebUsers can type 12 instead of clicking 11 times. Typed values are validated: digits only, clamped to the limits, the old value is kept if it's invalid.
Adults
Age 16+
Children
Age 2–15 · max 9 travellers
Several counters
AllTravel and ticket apps stack counters. Each needs its own limits (0 children is fine, 0 adults isn't) and its own name for screen readers.
input.value = "2"
Native number input
Web<input type=number> gives you tiny spin arrows for free, plus quirks: 'e' is allowed, the mouse wheel can change it, and an invalid value reads as empty.
Dev note: One name, many implementations
iOS has a native UIStepper (SwiftUI: Stepper). Material Design has no stepper component, so Android apps build their own from icon buttons, and Android’s older NumberPicker is a scroll wheel instead. On the web you get <input type="number"> or, more often, a custom component. Custom means every team makes slightly different decisions, and that’s where bugs hide.
The web’s number input and its quirks
The browser’s built-in number field looks like the perfect stepper: arrows, min, max, step. But it has surprises every web tester should know:
Dev note
<input type="number">.🔢 Native number input, under the microscope
This is a real <input type="number" min="1" max="10" step="1">. Type the samples below and watch what the browser reports.
- value
- "1"
- valueAsNumber
- 1
- Number(value)
- 1
- parseInt(value)
- 1
- validity
- valid
Click into the field, then scroll the mouse wheel over it. Value changes caused by the wheel: 0Chromium browsers change a focused number input on wheel; others may not. Try several browsers.
05value "05". Number() gives 5, but an app that keeps the string shows "05" and may even do "05" + 1 = "051".1e2Valid scientific notation: value "1e2", which is 100. parseInt("1e2") gives 1. Two parts of the app can disagree.eAllowed to type, but not a number: value is "" (empty) and badInput is true. The app sees an empty field.2.5Valid number, but stepMismatch is true for step="1". Does the app round, reject or send 2.5 items?-3Below min="1": rangeUnderflow. The browser only flags it; nothing stops the app from sending it.99Above max="10": rangeOverflow. Same story: min/max are hints until a form is validated.
- “e” is allowed, because
1e2(= 100) is a valid number in scientific notation. “e” on its own makes the value empty, not an error the app can see. - The mouse wheel can change the value in Chromium browsers when the field is focused. Users scroll the page and silently order 7 instead of 2.
- min, max and step are only hints. The browser flags invalid values, but nothing stops the app from sending them unless the form is validated.
- Leading zeros stay in the text (“05”), and code that treats the value as a string can do
"05" + 1 = "051".
Dev note
type="text" inputmode="numeric" with their own validation instead.Check this part
A cart line is at its maximum stock. What should the + button look like and do?
Which of these can a user type into the browser's built-in number field without the browser blocking it?
Users usually change the value by 1 or 2, but sometimes need 50. What is a good choice?