StealThis .dev

Music — Track List Row

A dense, Spotify-style tracklist component built in vanilla JS. Each row swaps its index number for a play button on hover and an animated equalizer while playing, with the active track highlighted in its cover-pulled accent. Rows carry CSS-drawn album art, artist and album names, like-heart toggles, live play counts, duration timestamps, a more menu, and drag-to-reorder handles. Simulated playback, toasts, and keyboard support included.

लैब में खोलें
html css vanilla-js
Targets: JS HTML

Code

Track List Row

A compact, music-app tracklist built around a single reusable row. Seven rows sit under a glassy header with a CSS-drawn album cover, playlist metadata, and a morphing play/pause button. Each row shows an index number that swaps to a play control on hover, a small gradient album thumbnail, track title and artist, album name, a live play count, a like (heart) toggle, a more (…) menu, and a duration timestamp — laid out on a tidy CSS grid that collapses gracefully on narrow screens.

Clicking a row (or its play button) starts simulated playback: the active row picks up its cover-derived accent color, its index morphs into a four-bar animated equalizer, and any previously playing row resets. Liking a track pops a heart and fires a toast; the … menu opens a keyboard-dismissable popover with queue, artist, album, and copy-link actions. A drag handle lets you reorder the list with live re-numbering, and play counts tick upward while a track plays.

Everything is dark-first and theme-driven from CSS custom properties, with aria-pressed on the play and like buttons, focusable rows that respond to Enter/Space, AA-contrast body text, and a prefers-reduced-motion fallback. No frameworks, no images, and no audio — playback is faked with timers and transforms.

Illustrative UI only — fictional artists, albums, tracks, and data. No real audio playback.