Component packs › Aisle › Size Picker

Size Picker

The mug grows or shrinks to the size you pick against a centimetre ruler, with the other sizes outlined and what it holds.

Size Picker is a size picker 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: ruler fit guide, spring resize, radio group.

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.

Size Picker props

PropTypeDefaultDescription
sizes{ label: string; sub: string; h: number; w: number; fits: string }[]Sizes: label, sub label, height and width in cm, and what it holds.
valuenumber1Selected size. Default 1.
glazenumberGlaze, 0 to 4 (0 follows the pack colour).
onChange(index: number) => void
autoplaynumber | falseShowcase mode: picks another size every N ms while visible.

Methods on the ref

Use it in React

import SizePicker from './SizePicker';

<SizePicker />

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

More in Aisle

Good for: Skeuomorphic UI.