Skip to content

Vinyl Record Player with Album Cover

Pure CSS turntable music player with a spinning vinyl record, album cover label, animated tonearm, progress bar and clickable tracklist.

Also known as: turntable music player, vinyl record player, spinning record animation, album cover music player

Pure CSS Music Players Responsive Dark #animation #audio #music #player #vinyl

Vinyl Record Player with Album Cover live demo

Open in new tab

Pure CSS code (HTML, CSS, JS)

A vinyl record player built with pure CSS and a little vanilla JavaScript: a walnut turntable with a spinning record, the album cover as the center label, a tonearm that swings onto the grooves, and a now-playing panel with progress bar, transport buttons and a tracklist. Use it on a band, label or podcast page.

How it works

The root section.vr-player is a two-column grid on wide screens. The left .vr-deck is the plinth; it sets container-type: inline-size, so every turntable part is sized in cqw units and scales with the card. .vr-platter holds the .vr-record, whose grooves are a repeating-radial-gradient, with the img.vr-label cover in the middle. A conic gradient on .vr-platter::after adds a light reflection that stays still while the record turns underneath. .vr-pivot and the .vr-arm (counterweight, rod and headshell) form the tonearm.

Everything visual depends on the .is-playing class on the root. It sets animation-play-state: running for the vr-spin keyframes, rotates .vr-arm from --vr-arm-rest to --vr-arm-play, lights the .vr-led and swaps the pause and play icons. The script toggles that class from the .vr-play button, advances the elapsed time once per second, writes it to --vr-progress and the .vr-time-current label, and moves to the next track when one ends. Clicking a .vr-track starts that song, .vr-prev restarts the track or goes back, and the .vr-rpm buttons switch --vr-spin between 33 and 45 rpm. Without JavaScript the record still spins in its initial state.

Customization

  • --vr-accent on .vr-player: color of the play button, progress bar, active track and selected speed.
  • --vr-wood-1 and --vr-wood-2: the two gradient stops of the plinth, e.g. #d8d2c8 and #a49c90 for a light oak look.
  • --vr-spin: seconds per turn; the SPIN object in script.js holds the values for the 33 and 45 buttons.
  • --vr-arm-play: tonearm angle while playing; lower values put the stylus closer to the edge of the record.
  • data-vr-start on the root: the elapsed seconds shown on first load; data-vr-duration on each .vr-track sets its length.
  • Remove is-playing from the root to load the player paused with the arm resting.

The album cover is a photo from Unsplash; replace it with your own square artwork.

Use cases

  • Band and artist websites: a spinning record with the album cover as its label presents the latest release
  • Record label pages: visitors click tracks in the tracklist and watch the tonearm swing onto the record
  • Podcast pages: a now-playing panel with progress bar and transport buttons adds a retro look to episode lists
  • Music blogs and portfolios: 33 and 45 rpm buttons let visitors change how fast the record turns

Accessibility

All controls are real button elements with visible focus outlines. The transport buttons have aria-label values, and the play button switches between "Play" and "Pause". The speed buttons use aria-pressed inside a labelled group, the playing song is marked with aria-current, and the "now playing" line is an aria-live region so track changes are announced. The progress bar exposes role="progressbar" with aria-valuenow and a readable aria-valuetext. The decorative tonearm and LED are hidden from assistive tech. With prefers-reduced-motion the record stops spinning and the arm moves without animation.

Usage notes

The player simulates playback with a timer. To play real audio, add an audio element and call play() and pause() inside setPlaying(), using its timeupdate event instead of tick(). Several players can share a page.

Vinyl Record Player with Album Cover at a glance

Framework
Pure CSS
Code
HTML, CSS, JavaScript
JavaScript
Vanilla JavaScript, no jQuery
Dependencies
None
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 Vinyl Record Player with Album Cover 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?

There is nothing to install. 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

No dependencies. Pure HTML, CSS and JavaScript.

Vinyl Record Player with Album Cover – free Pure CSS music player template
Vinyl Record Player with Album Cover · free Pure CSS music player template

More Music Players

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

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.

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.