REFERENCE
- Gallery page: https://magpui.com/en/i/vertical-pill-scrubber-menu-1bf0ae
- First frame (image): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/vertical-pill-scrubber-menu-1bf0ae/shot.jpg
- Clip (mp4): https://dnioievkvxejjbxgwvko.supabase.co/storage/v1/object/public/media/vertical-pill-scrubber-menu-1bf0ae/clip.mp4
- Original post: https://x.com/seanaiux/status/2120587109606306243 by @seanaiux
Before building, download the first frame and look at it. If ffmpeg is available, download the clip and extract frames (ffmpeg -i clip.mp4 -vf fps=2 frame-%02d.png), then study the motion frame by frame. Match what you see; the text below describes it, the frames are the truth.
BUILD: A compact vertical navigation control for an image-led portfolio. Next to the right edge of a full-bleed project photo floats a black pill (about 28px wide, 110px tall). Inside it: a small circular icon at the top, a rounded thumbnail of the current project's image (20x32px), a column of tiny dots for the other projects, and a two-digit index (01) at the bottom. Scrolling or dragging inside the pill scrubs between projects: the thumbnail slides to the active dot and the big photo changes with a soft cross-fade and a large serif title sliding in at bottom-left. Clicking the pill morphs it into a dark card (about 180x260px) anchored to the same spot: a large image preview with the project name in big serif on top of it, then a numbered list (Arrival, Studio, Work, Material, Contact). Hovering a list row swaps the preview image and title; choosing one closes the card back into the pill.
DESIGN SYSTEM: Page frame: off-white #efede8 browser-like surface with radius 14px around a photo panel radius 10px. Pill: #0d0d0d, radius 999px, 1px inner border rgba(255,255,255,0.08), shadow 0 8px 24px rgba(0,0,0,0.35). Index text 9px mono, #9a9a9a. Dots 3px #6b6b6b, active thumbnail radius 6px. Open card: #111 at 92% opacity with backdrop-filter blur(16px), radius 14px; preview image radius 10px; title elegant high-contrast serif 28px white; list rows 11px sans #d8d8d8 with a leading index and a right-aligned small meta label, row height 22px, active row #ffffff with a 1px left marker. Photo caption bottom-right 11px white 80%.
MOTION:
- Pill to card morph: shared-layout transition of width, height and border-radius (999px to 14px), 420ms, cubic-bezier(0.32, 0.72, 0, 1); card contents fade in 180ms after a 120ms delay, list rows stagger 30ms.
- Card to pill: reverse in 320ms, contents fade out first in 100ms.
- Scrub: thumbnail translateY to the active dot, 260ms, cubic-bezier(0.22, 1, 0.36, 1). Background photo cross-fade 500ms with a scale from 1.04 to 1. Big serif title slides in from x -40px with 600ms ease-out and a clip reveal.
- Hover in list: preview image cross-fade 200ms, title swap with 8px vertical slide.
SECTIONS: Parts and states: idle pill (thumbnail at active dot); hover pill (scale 1.04, cursor pointer); scrubbing (thumbnail moving, photo changing); open card (preview, title, list); row hover; closing.
IMPLEMENTATION: React with Motion (layout/layoutId for the morph, AnimatePresence for content). CSS for blur and radii. Wheel and pointer drag on the pill map to project index with a small threshold. Keyboard: pill is a button with aria-expanded; Arrow Up/Down scrub when focused; Enter opens; inside the card, list rows are focusable links, Escape closes and returns focus to the pill. prefers-reduced-motion: replace morph and slides with 120ms opacity fades. Preload neighbouring project images.
ADAPT TO THE PROJECT: Reuse the project's existing design tokens, fonts and button primitives. Map colors to the closest existing tokens. Never copy logos, brand names, photos or illustrations from the original; use placeholder architecture images and project names.
SUCCESS CHECK:
- The pill shows a moving thumbnail and index, and scrubbing it changes the background project with a smooth cross-fade.
- Clicking morphs the pill into the card in one continuous shape change, and hovering rows swaps the preview.
- It is fully usable with keyboard only, and Escape returns focus to the pill.