Category: Navigation and lists · Interaction: hover, cursor-follow · Stack: any (vanilla JS + GSAP recommended)
Prompt
Build a full-screen project index for a creative portfolio. It is a vertical list of oversized project names, where hovering a name reveals a floating preview image that trails the cursor.
Look and feel
- Light theme: warm paper background (around
#f3efe6) with deep ink text (around#1b1b1b). Use one accent colour from my brand for the hovered name. - Typography: a high-contrast serif or a wide grotesk in uppercase, very large (about 6–8vw), tight line-height, left-aligned with generous outer padding.
- 6–10 project names from my own work, each with a matching landscape image (3:2).
Intro
- On load, after a short pause, the names rise into view one after another from behind an invisible mask. Each line can start with a slight skew that straightens as it lands.
- Disable hover until the intro has finished.
Hover behaviour
- Hovering a name changes its colour to the accent. A preview card (about 40% of the viewport width, 3:2) fades in behind the text.
- The card enters with a small tilt and a rise, settling flat at full size. On leave it drifts upward, shrinks a little and fades out.
- While hovering, the card follows the cursor with a noticeable, smooth lag, as if it has weight. It stays offset so it never sits directly under the pointer.
- Moving quickly between names swaps cards cleanly, with no flicker or stacked images.
Accessibility and devices
- Make each name a real link. Keyboard focus triggers the same preview, positioned near the focused item.
- With
prefers-reduced-motion, skip the intro motion and show the preview without the follow lag. - On touch screens, hide the floating card and show a small thumbnail beside each name instead.
Performance
- Animate only
transformandopacity. Cache element measurements and update them on resize; don't measure layout on every mouse move.
Deliverable: clean, commented HTML, CSS and JS (or one component in my framework of choice), with image paths easy to swap.