Navigation
Tilt Dock
Five glass tiles in a dock that rotate in 3D toward the pointer — up to 34° on the far ones, the nearest lifting 22px toward you — with a sheen that slides across each face as it turns; a virtual pointer sweeps the row in a slow figure when nobody is over it.
cssmedium complexitymoderate motionpointer
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
Launchers and hero navs that want tactile depth without magnification; showcases for a small set of apps or tools.
When not to
Touch-only interfaces (nothing to tilt toward) and busy backgrounds where the sheen reads as glare.
Working with an AI agent
Every component ships agent-ready metadata. An example instruction for this one:
Tame the effect by lowering MAX_Y (34) and LIFT (22); widen the reach with RANGE (1.6 item-widths); change the tile colours through --g1…--g5; kill the sheen by removing the .c16-item::after rule. 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
- tilt limits and lift (MAX_Y, MAX_X, LIFT)
- reach (RANGE) and perspective (260px on .c16-dock)
- sheen strength (--sheen) and its radius (46%)
- sweep speed (the 0.9 and 1.7 in loop())
- tile gradients (--g1…--g5) and size (--sz clamp)
- theme tokens (:root dark defaults + [data-theme=light] overrides)
Keep intact
- measure() caching centres on load + resize (never getBoundingClientRect per frame)
- update() writing only custom properties (transform + gradient position resolve in CSS)
- IIFE wrapper
- visibilitychange stop/start of the rAF loop
- prefers-reduced-motion guard (a still lit pose)
- lastInput pause so the sweep never fights the real pointer
- theme hook (?theme= bootstrap + forever:theme message listener + theme tokens)
Known limitations
- Pointer-only — no touch equivalent; the sweep is what mobile visitors see
- mix-blend-mode:screen on the sheen is a per-tile compositing cost; drop it on very low-end targets
- 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.