Component packs › Plumb › Ruler Zoom
Zoom and the steel rule stretches around its anchor while half centimetres, millimetres and half millimetres fade in as they gain room.
Ruler Zoom is a zoom control from Plumb, a component pack with 6 measuring controls: Range sliders, angle pickers and loaders built from measuring tools. Price: $2 for the whole pack.
Built with: subdivisions fade in, log-space zoom spring, drag, wheel and keys.
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 |
|---|---|---|---|
value | number | Zoom as a fraction: 1 = 100 %. | |
min | number | ||
max | number | ||
stops | number[] | Button stops. | |
label | string | Accessible name. | |
onChange | (zoom: number) => void | ||
autoplay | number | false | Showcase mode: steps the zoom every N ms while visible. |
readonly value: numbersetValue(z: number, silent?: boolean): voiddestroy(): voidimport RulerZoom from './RulerZoom';
<RulerZoom />The Vue, HTML, Next.js, Tailwind and Motion versions take the same options.
Good for: Sliders.