Open experiment
Quantity stepper control
A commerce-focused quantity primitive with explicit decrement and increment actions, a readable numeric value, press feedback, and inventory messaging that changes as the selected amount approaches stock.
Lab tested Responsive Dark mode Interactive
- Version
- 1.0.0
- Updated
- 2026-08-02
- Dependencies
- Zero
<div class="cmp-quantity-stepper">
<span class="cmp-quantity-stepper__label">Quantity</span>
<div class="cmp-quantity-stepper__controls">
<button type="button" data-action="decrease" aria-label="Decrease quantity">−</button>
<input type="number" value="1" min="1" max="8" readonly aria-label="Selected quantity" />
<button type="button" data-action="increase" aria-label="Increase quantity">+</button>
</div>
<span class="cmp-quantity-stepper__status" aria-live="polite">In stock · ships today</span>
</div>
No runtime reactions detected Open in Editor
Validated in the lab
Experiment report
- Schema and source files passed
- Responsive test passed
- Keyboard test passed
- No console errors
Component ingredients
- Dependencies
- None
- Browser support
- Current Chrome, Current Edge, Current Firefox, Current Safari
- Version
- 1.0.0
- Last tested
- 2026-08-02
Accessibility notes
- Increment and decrement buttons have explicit accessible names.
- Current quantity remains in a native numeric input.
- Boundaries disable unavailable actions and update live guidance.
License: MIT License for open-source use, modification, and distribution.