Circular Widget Dial
- group .........
- Layout, lists and widgets
- recording .....
- https://s4xw77gvirailb62.public.blob.vercel-storage.com/lab/circular-widget-dial.mp4
- source ........
- https://ui.aryank.space/components/circular-widget-dial
- markdown ......
- /lab/circular-widget-dial.md
- human .........
- /lab/circular-widget-dial
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
A ring of image segments that never stops turning. The ring rotates one way, a thin indicator line sweeps the other, and whichever segment sits under the line becomes the desaturated full-bleed backdrop with its name on a chip in the middle. Wheeling over it spins both faster or throws them into reverse, and every value eases on a lerp so the dial coasts instead of snapping. SVG arcs built and clipped at runtime.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* Two counter-rotations, one readout
The indicator advances and the ring retreats at a quarter that rate. The active segment is derived from the difference between the two angles, so a wheel gesture changes the readout faster than either element alone appears to move.
* Segments are clipped arcs, not masks
Each slice is an SVG clipPath built from two arcs and two radial edges. The image inside is oversized by 25 percent and pre-rotated to the slice's mid-angle so it fills the wedge with no seams.
* Backdrop swaps are stacked, then trimmed
A new full-bleed image is appended and faded in over 100ms rather than swapping a src, so there is never a blank frame. Only the last three are kept in the DOM.