Navigation
Command Palette
A Cmd+K command palette that opens over a blurred overlay, auto-types queries, filters rows live, and highlights the selection with a spring-eased panel entry.
cssmedium complexitysubtle motionclickmobile-ready
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
1
When to use it
App shells, developer tools, or dashboards needing a keyboard-driven command interface or search-filter nav pattern.
When not to
Simple sites with fewer than 5 commands — the modal overhead outweighs the UX benefit. Auto-cycle must be removed before production use. 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:
Add a new command {i:'⬇', t:'Export CSV'} to the commands array and change the accent color from marigold (#C09C59) to rose (#f43f5e). 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
- commands array (label + icon pairs)
- accent color (--accent-cyan)
- panel max-width (300px)
- panel open animation duration (--dur-base)
- autonomous preview until first deliberate input cadence (DEMO_EVERY=4600 ms) + query list (queries array)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- IIFE wrapper
- prefers-reduced-motion guard
- visibilitychange stop/cycle handler
- overlay click-outside-to-close logic
- idle demo clock (setInterval tick() driving open/filter/render — takeover on real pointerdown + 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
- autonomous preview cycle that stops at first deliberate input runs by default (real input takes over, resumes after a few idle seconds) — remove the demo block for purely on-demand interaction
- Trigger button lacks aria-haspopup/aria-expanded attributes for full accessibility
- backdrop-filter blur unsupported in older browsers (degrades gracefully to semi-transparent overlay)
- 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.
- 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.