Skip to content

Music Player with Album Art and Playlist

Dark Tailwind CSS music player with large album art, a blurred cover backdrop, transport controls, seek and volume sliders and a clickable playlist.

Also known as: audio player with playlist, music player ui, album art player, web music player, dark music player

Music Player with Album Art and Playlist live demo

Open in new tab

Tailwind CSS code (HTML, CSS, JS)

A dark music player built with Tailwind CSS that pairs large album art and transport controls with a clickable "Up next" playlist. The blurred cover glows behind a frosted glass panel, and choosing a track swaps the artwork, title and duration. It works well for artist pages, label sites, streaming app mockups and playlist embeds.

How it works

The root is section.tap-player. A blurred copy of the cover (data-tap-backdrop) and a gradient overlay sit behind a glass panel with backdrop-blur-xl. From md up the panel is a two-column grid; on phones the playlist moves below the player. The left column holds the data-tap-cover image, the data-tap-title and data-tap-artist text, a like button, the data-tap-seek range with elapsed and total time, the shuffle, previous, play, next and repeat buttons, and a volume slider. The right column is an ordered list of .tap-track buttons; each one stores its large image in data-tap-art, plus data-tap-alt, data-tap-title, data-tap-artist and data-tap-duration (seconds).

The script initializes every .tap-player on DOMContentLoaded. Clicking a row sets aria-current="true" on it, updates the cover, backdrop and text, and starts playback. The play button toggles the tap-is-playing class, which animates the .tap-eq bars on the current row and slightly scales the cover. Playback is a simulated clock; at the end of a track it repeats when repeat is on, jumps to a random track when shuffle is on, or moves to the next one. "Previous" restarts the song first and only goes back when pressed near the start. For real audio, connect an audio element and drive the same functions from its timeupdate and ended events.

All artwork photos come from Unsplash; replace them with your own album covers.

Customization

  • Add a li with a .tap-track button to the data-tap-list list: fill in its data-tap-* attributes and a 96 px thumbnail.
  • accent-fuchsia-400, text-fuchsia-300 and aria-pressed:text-fuchsia-400: swap fuchsia for emerald or sky to change the highlight color.
  • bg-[#140b24] on .tap-player: change the base background and the matching gradient overlay colors.
  • opacity-40 blur-3xl on data-tap-backdrop: raise the opacity for a stronger album glow, or remove the image for a flat background.
  • max-w-[272px] on data-tap-cover: enlarge or shrink the album art.
  • md:grid-cols-[minmax(0,1fr)_minmax(0,1.1fr)]: rebalance the player and playlist columns.

Use cases

  • Music and band websites: large album art with a blurred cover backdrop sets the mood
  • Artist portfolios: transport controls, seek and volume sliders give full playback control
  • Streaming prototypes: a clickable playlist lets users switch the current track in a prototype quickly
  • Podcast and audio sites: a dark player with large cover art fits media-focused pages for listeners

Accessibility

Every icon button has a hidden text label, and the play button's aria-label switches between "Play" and "Pause". Shuffle, repeat and like use aria-pressed, and the playing row is marked with aria-current. The seek slider exposes an aria-valuetext like "1:24 of 3:42", and track changes are announced through a polite live region. Focus outlines are visible on all controls, and the equalizer and cover animations stop under prefers-reduced-motion.

Music Player with Album Art and Playlist at a glance

Framework
Tailwind CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
Tailwind CSS
Layout
Responsive, works on mobile, dark design
Category
Music Players
License
Free for personal and commercial use

Questions about this template

Can I use the Music Player with Album Art and Playlist code for free?

Yes. You can copy or download the code and use it in personal and commercial projects, including client work. No sign-up is needed. Reselling it as part of a component library or template collection is not allowed; see the license.

How do I add it to my website?

Load Tailwind CSS from a CDN (the links are under Requirements). Paste the HTML where the component should appear, add the CSS to your stylesheet and load the JavaScript before the closing </body> tag. Download HTML gives you a complete page with everything already linked.

Does it need jQuery or a JavaScript framework?

No. The script is plain vanilla JavaScript, so it works without jQuery, React or Vue. You can still use the markup inside those frameworks.

Does it work on mobile?

Yes. The layout adapts to small screens. Use the Mobile and Tablet buttons above the live demo to check it at phone and tablet width.

Requirements

Add these to your page (already included in the download):

  • <script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script>

The Tailwind browser build is for prototyping. In production, compile Tailwind with its CLI or your bundler.

Music Player with Album Art and Playlist – free Tailwind CSS music player template
Music Player with Album Art and Playlist · free Tailwind CSS music player template

More Music Players

Mini Audio Player Bar – free Bootstrap 5 music player template

Mini Audio Player Bar

Bootstrap 5 fixed bottom audio player bar with cover art, play, skip, seekable progress, volume slider, mute and a clickable playlist.

Music Player Card – free Pure CSS music player template

Music Player Card

Dark music player card with a spinning vinyl cover, seek bar, play, skip, shuffle and repeat controls, volume slider and a clickable playlist.