Accordion Frames
- group .........
- Cursor and hover effects
- source ........
- https://ui.aryank.space/components/accordion-frames
- markdown ......
- /lab/accordion-frames.md
- human .........
- /lab/accordion-frames
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
A horizontal focus accordion: a row of thin image slats that spring open to a wide panel on hover (or tap), with a bordered focus indicator and light beams that track the open frame. Pure React, motion handled entirely by one CSS transition.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* No animation library
Every move is one CSS transition on left/width. The component only computes geometry — the browser does the easing, so it stays cheap even with twenty panels.
* Centered as a set
The strip is sized for exactly one open panel and centered as a whole, so it never jumps. The focused slat widens in place while the rest compress, and the indicator beams track wherever it lands.
* Touch vs. hover
Below the breakpoint the layout thins to fewer panels and focus switches from hover to tap, so the accordion stays usable on a phone.