Component packs › Aisle › Quantity Stepper

Quantity Stepper

One mug per item: each extra slides in and the row re-centres; take one away and it slides off.

Quantity Stepper is a stepper from Aisle, a component pack with 6 product page components: Product page controls where the product itself changes with every choice. Price: $2 for the whole pack.

Built with: row on springs, live subtotal, stepper buttons.

Code: React and Next.js (TypeScript), Vue 3, plain HTML/CSS/JS, Tailwind CSS v4 and Motion (motion.dev). No npm packages needed. Keyboard accessible, with a reduced-motion version, in dark and light.

Quantity Stepper props

PropTypeDefaultDescription
valuenumber
maxnumber6Default 6.
pricenumber28Price per item. Default 28.
currencystring
glazenumberGlaze, 0 to 4 (0 follows the pack colour).
onChange(qty: number) => void
autoplaynumber | falseShowcase mode: steps up and down every N ms while visible.

Methods on the ref

Use it in React

import QuantityStepper from './QuantityStepper';

<QuantityStepper />

The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.

More in Aisle

Good for: Skeuomorphic UI.