Navigation
Side Rail Dock
A vertical rail dock pinned to the left edge: six line icons with an accent bar that slides between them and labels that slide out to the right on hover; idle it steps down the rail, each label peeking as it lands.
csslight complexitysubtle motionclick
Open on the canvas to copy the code → Free account · 3 copies a day · membership goes unlimited
Worth keeping?
Votes steer what gets built next — sign in to cast one, free to read
When to use it
App shells and dashboards with a collapsed icon sidebar; any vertical nav that needs an active state and hover labels without a full-width drawer.
When not to
Navs whose items need visible text at all times; very short viewports where six rows will not fit.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Swap an icon by replacing the inline <svg> path inside its <button class="c12-item"> and its aria-label + .c12-lbl text; change the accent with --accent/--accent-soft (dark) and their [data-theme=light] pair; slow the walk by raising the 1500 in setInterval. 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
- icon SVGs and labels
- accent colour (--accent, --accent-soft)
- rail width and row height (--w, --h clamps)
- walk cadence (setInterval 1500) and label peek (950 ms)
- the page hint (.c12-pane) — remove for a bare rail
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- select() computing the indicator from offsetTop once per selection (never per frame)
- IIFE wrapper
- visibilitychange stop/start
- prefers-reduced-motion guard (slower walk, no transitions)
- lastInput pause after real hover or press
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Labels are pointer/keyboard affordances — on touch the active state still steps but labels only show during the demo peek
- Icons are simple stroked paths at 1.9px; swapping in filled icons needs the stroke rules relaxed
- Light re-theme via the [data-theme=light] token block; catalog bg/accent describe the dark default
More Navigation components
- Magnify DockmacOS-style frosted-glass dock of six gradient tiles that scale up and lift toward the cursor; idle auto-sweep keeps it animated when untouched.
- 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 idly across links when unhovered.