A stacked row of Spotify album covers that pop a spinning vinyl disc when clicked, with hover lift, neighbor dimming, and album art reflections.
Installation
Requires a /api/spotify route. See the Spotify
Card docs for setup instructions.
Usage
How It Works
- Each card fetches its own track metadata via
GET /api/spotify?url=...independently, so the stack renders progressively. - Cards stack with a
z-indexdetermined by their position (leftmost on top). Clicking ejects an SVG vinyl disc upward with a spring animation, and the clicked card rises toz-200to sit above siblings. - Only one vinyl can be open at a time — activating a new card retracts the previous one.
- The vinyl SVG uses unique
useId-scoped filter IDs to avoid SVG mask conflicts when multiple cards render simultaneously. - A flipped, masked copy of the album art beneath each card creates a CSS-only reflection effect.
- The
@keyframes spinanimation must be present in yourglobals.cssfor the disc to rotate.
API Reference
AlbumCards
| Prop | Type | Default |
|---|---|---|
albums? | AlbumCardData[] | - |
title? | string | "Music I'm Vibin' to" |
className? | string | - |
AlbumCardData
| Prop | Type | Default |
|---|---|---|
id? | string | - |
url? | string | - |