Navigation
Stack Fan Dock
A dock whose fourth slot is a document stack: press it and four tinted cards fan upward in a 54° arc with a staggered spring, press again to gather them; it runs autonomously fans open for 1 until first deliberate input.7 s and closes for 2.3 s on its own.
csslight complexitymoderate motionclickmobile-ready
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
Recent-files or quick-actions menus in a dock, launcher, or toolbar; any place a single slot should reveal a small set without a full menu.
When not to
Sets larger than ~5 items (the fan gets crowded) and layouts with no headroom above the dock for the cards to rise into.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Add a card by appending another <span class="c14-card"> and giving it its own --tint/--a/--d nth-child rule (spread the --a angles evenly); change the rise with the -1.15 in the .is-open transform; make hover-only by removing the click handler. 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
- card count, tints (--c1…--c4) and fan angles (--a per card)
- stagger (--d per card) and spring curve (cubic-bezier(.34,1.4,.64,1))
- rise distance (translateY -1.15 × --sz)
- demo timing (phase 5 open / 22 close on a 100 ms clock)
- dock items and gradients (--g1, --g2, --g3, --g5)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- transform-origin 50% 100% on .c14-card (the fan pivots from the slot)
- aria-expanded kept in step by setOpen()
- IIFE wrapper
- visibilitychange stop/start of the phase clock
- prefers-reduced-motion guard (cards fade, no spring)
- lastInput pause so the demo never fights a real press
- 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
- The cards are decorative — no titles or click targets inside them yet
- The dock is bottom-anchored (padding-bottom 12%) to leave room for the fan; re-centre it and the top cards may clip
- 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.