Navigation
Underline Follow
A glowing emerald-to-tan gradient underline slides and resizes to follow hovered nav links; wanders until first deliberate input across links when unhovered.
csslight complexitysubtle motionhover
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Portfolio or app nav bars needing a polished active-state indicator with ambient motion between interactions.
When not to
Nav bars with more than 6 items where the idle wander may feel restless; or any context requiring a truly static nav indicator. Autonomous preview ends at first deliberate input and never resumes.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the underline gradient to gold-to-orange by setting --accent-iris:#f59e0b and --accent-cyan:#f97316, and slow the idle cycle to 2400ms. Theme: dark tokens live in :root, the light variant in :root[data-theme="light"]; ?theme=light or a {type:'forever:theme'} postMessage switches at runtime. Autonomous preview ends at first deliberate input and never resumes.
Safe to edit
- accent colors (--accent-iris, --accent-cyan)
- transition duration (420ms on .c06-nav__ink)
- idle wander interval (1600ms in setTimeout) Autonomous preview ends at first deliberate input and never resumes.
- underline height (height:2px on .c06-nav__ink)
- gap between nav items (gap:6px)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- prefers-reduced-motion guard (kills idle loop)
- visibilitychange stop/loop guard
- IIFE wrapper
- mouseleave return-to-active logic
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
- demo-v1 preview lifecycle: initialize demoEnabled from window.__foreverPreview and stop attract work on the window forever:interactive event; retain manual feedback, settling, cleanup and explicit sessions
Known limitations
- Idle wander uses offsetLeft/offsetWidth — breaks if nav is not laid out when loop starts Autonomous preview ends at first deliberate input and never resumes.
- No touch equivalent for hover; on mobile the underline stays on last-active item only
- Autonomous idle cycle must be removed or paused for production click-driven nav Autonomous preview ends at first deliberate input and never resumes.
- State remains local to each mounted instance; format/theme remount preserves takeover, not component values.
More Navigation components
- Magnify DockmacOS-style frosted-glass dock of six gradient tiles that scale up and lift toward the cursor; idle sweep that stops at first deliberate input keeps it…
- Hamburger MorphThree-line hamburger button spring-morphs into a glowing teal X on click; button border gains teal glow when open. Auto-cycles as demo.
- Gooey Tab BarPill-shaped tab bar with a vermillion blob that slides between tabs using a spring easing and SVG goo filter for liquid merge effect on dark surface.
- Radial Fan MenuA core button rotates to an X and fans five glowing stone-toned icon petals outward in a staggered spring arc; auto-cycles open/close as a demo.
- Slide-in DrawerHamburger icon morphs to an X while a side panel slides in over a dark scrim, revealing four nav items with staggered fade-in animations.
- Sliding PillA 3-segment Day/Week/Month toggle where a glowing translucent pill slides between options with a spring bounce on a dark rounded bar.