Sliding Index Menu
- group .........
- Menus and navigation
- source ........
- https://ui.aryank.space/components/sliding-index-menu
- markdown ......
- /lab/sliding-index-menu.md
- human .........
- /lab/sliding-index-menu
── WHAT_IT_IS ────────────────────────────────────────────────────────────────────────────────
A full-screen menu that wipes up from the bottom edge and hands the page over to an oversized link index. The whole rail slides horizontally against the pointer so moving right pulls the far links into reach, and an accent bar chases whichever link is hovered, easing its position and its width at once. Each link swaps to a duplicate copy on a per-character roll. GSAP SplitText with Lenis.
── BEHAVIOUR ────────────────────────────────────────────────────────────────────────────────
* The rail is longer than the frame on purpose
The link row is sized to its content and can overflow the panel. Pointer position maps to how far it slides, using only the middle half of the frame as the sensitive range, so small movements near the edges do nothing and the far links stay reachable.
* The highlighter eases two properties at once
Position and width are both lerped toward the hovered link's box every frame, so the bar stretches and travels as one motion instead of snapping to each new word.
* Overflow is only unlocked once open
Links keep overflow hidden through the wipe so they cannot poke outside the panel mid-animation, then switch to visible on completion, which is what lets the hover roll push characters past their own box.