Rotating Panel Slider
- group .........
- Sliders and carousels
- recording .....
- https://s4xw77gvirailb62.public.blob.vercel-storage.com/lab/rotating-panel-slider.mp4
- source ........
- https://ui.aryank.space/components/rotating-panel-slider
- markdown ......
- /lab/rotating-panel-slider.md
- human .........
- /lab/rotating-panel-slider
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
Three panels on an arc where the side ones are turned a quarter turn on their own axis while the picture inside is counter-rotated by the same amount, so the image stays upright while its frame lies flat. Advancing moves each panel to the next station and re-opens or re-closes its clip-path at the same time, so a card does not slide in, it unfolds into place. A fourth panel is built off-frame at scale zero for the vacated slot and the far one is scaled away, so the arc is always exactly three visible. The title is split per character and enters from the direction of travel, and a blurred pan of the active image sits behind everything.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* Frame turns, picture does not
Each panel is rotated to its station and its inner image is tweened to the exact negative of that rotation. The photograph stays upright while its frame lies flat, which is the whole illusion.
* Four panels for three slots
A replacement is built at scale zero in the slot being vacated before the far panel is scaled away, so the arc is never seen with a gap in it.
* Class names are the state machine
prev/active/next are read back out of the DOM to find the panels, then reassigned after two seconds. There is no separate index for panel identity, only for content.