Navigation
Auto-hide Dock
A desktop with a window, and a dock that lives just below the bottom edge: it slides up when the pointer reaches the lowest 14% of the screen and drops away when it leaves; a ringed demo cursor glides to the edge and away on a loop until the real pointer takes over.
cssmedium complexitymoderate motionpointer
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Immersive or content-first screens (viewers, editors, kiosks) where navigation should stay out of the way until summoned; onboarding demos of an edge gesture.
When not to
Touch-first products (there is no edge to hover) and pages where the dock must be discoverable without a demo.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Change the reveal threshold with EDGE (0.86 = bottom 14%); remove the demo cursor by deleting the KEY path and calling screen.classList.add('is-show') in start(); restyle the window through --win/--win-bar/--txt. 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.
Safe to edit
- reveal threshold (EDGE=0.86)
- demo cursor path and loop length (KEY keyframes, the 4.6 s period)
- dock items and gradients (--g1…--g5)
- the window dressing (.c13-win, .c13-chip)
- slide timing (transition 380ms)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- place() applying the same EDGE rule to the demo cursor and the real pointer
- IIFE wrapper
- visibilitychange stop/start of the rAF loop
- prefers-reduced-motion guard (dock simply shown, no cursor)
- native pointer remains visible after demo cursor yields to input
- 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
- Hover-only reveal — no touch equivalent; the demo loop is what mobile visitors see
- The demo cursor is a styled span, not the system cursor, so it cannot click anything
- Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
- 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.
- 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.
- Underline FollowA glowing emerald-to-tan gradient underline slides and resizes to follow hovered nav links; wanders until first deliberate input across links when unhovered.
- 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.