Component packs › Aisle › 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.
| Prop | Type | Default | Description |
|---|---|---|---|
sizes | { label: string; sub: string; h: number; w: number; fits: string }[] | Sizes: label, sub label, height and width in cm, and what it holds. | |
value | number | 1 | Selected size. Default 1. |
glaze | number | Glaze, 0 to 4 (0 follows the pack colour). | |
onChange | (index: number) => void | ||
autoplay | number | false | Showcase mode: picks another size every N ms while visible. |
readonly value: numbersetValue(index: number, silent?: boolean): voiddestroy(): voidimport SizePicker from './SizePicker';
<SizePicker />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Skeuomorphic UI.