Skip to content
animorio
IT
All components

Vinyl playlist

Lists, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.2 KBGSAP 28 KBFreeDownload the zip

The playlist of a music site: five tracks in a list, each with its small cover. The track being played opens on a spring: the cover grows into a record that spins, the artist, the level bars and the running time line appear. Tap another track and the first one closes while its record comes back upright; on pause the record slows to a stop. When a track ends the next one starts.

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React and Vue tabs hold the same demo as a ready component, which switches its animations off when it leaves the page.

<!doctype html>
<!--
  "Vinyl playlist" from Animorio · https://animorio.com
  License: free on your own sites and your clients’ sites, paid work included.
  Not for resale, redistribution, templates or code collections · https://animorio.com/en/license/
-->
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Vinyl playlist</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage">
    <!-- the playlist of a music site: the track being played opens up, its cover grows into a record that spins,
         the line runs with the time and the next track takes over when it ends -->
    <section class="pl" data-pl aria-labelledby="pl-title">
      <header class="pl__head">
        <span class="pl__name"><b id="pl-title">Late Night Drive</b><span class="pl__sub"><span data-sub>5 tracks, 19 min</span></span></span>
        <button class="pl__play" type="button" data-play aria-label="Pause" aria-pressed="true">
          <svg class="pl__ico pl__ico--pause" viewBox="0 0 24 24" aria-hidden="true"><rect x="6.500" y="5.500" width="3.800" height="13" rx="1.200"></rect><rect x="13.700" y="5.500" width="3.800" height="13" rx="1.200"></rect></svg>
          <svg class="pl__ico pl__ico--play" viewBox="0 0 24 24" aria-hidden="true"><path d="M8.300 5.600v12.800a.9.9 0 0 0 1.370.770l10.200-6.400a.9.9 0 0 0 0-1.540L9.670 4.830A.9.9 0 0 0 8.300 5.600Z"></path></svg>
        </button>
      </header>

      <ol class="pl__list" data-list>
        <li class="pl__row" data-row data-len="222" style="--a:#f2a65a;--b:#b23a48"><button class="pl__hit" type="button" aria-label="Play Sodium Lights by Vela Park"></button><span class="pl__disc" aria-hidden="true"><i class="pl__art" data-art></i></span><span class="pl__text"><b>Sodium Lights</b><span>Vela Park</span></span><span class="pl__eq" aria-hidden="true"><i></i><i></i><i></i></span><span class="pl__len">3:42</span><span class="pl__time" aria-hidden="true"><span data-now>0:00</span><span class="pl__bar"><i data-fill></i></span></span></li>
        <li class="pl__row" data-row data-len="245" style="--a:#7fb7be;--b:#2d4f6c"><button class="pl__hit" type="button" aria-label="Play Underpass by Hollow Coast"></button><span class="pl__disc" aria-hidden="true"><i class="pl__art" data-art></i></span><span class="pl__text"><b>Underpass</b><span>Hollow Coast</span></span><span class="pl__eq" aria-hidden="true"><i></i><i></i><i></i></span><span class="pl__len">4:05</span><span class="pl__time" aria-hidden="true"><span data-now>0:00</span><span class="pl__bar"><i data-fill></i></span></span></li>
        <li class="pl__row" data-row data-len="198" style="--a:#e9d8a6;--b:#6a8d52"><button class="pl__hit" type="button" aria-label="Play Last Tram Home by Mirelle"></button><span class="pl__disc" aria-hidden="true"><i class="pl__art" data-art></i></span><span class="pl__text"><b>Last Tram Home</b><span>Mirelle</span></span><span class="pl__eq" aria-hidden="true"><i></i><i></i><i></i></span><span class="pl__len">3:18</span><span class="pl__time" aria-hidden="true"><span data-now>0:00</span><span class="pl__bar"><i data-fill></i></span></span></li>
        <li class="pl__row" data-row data-len="271" style="--a:#c9b6e4;--b:#4a3f7a"><button class="pl__hit" type="button" aria-label="Play Wet Asphalt by North Arcade"></button><span class="pl__disc" aria-hidden="true"><i class="pl__art" data-art></i></span><span class="pl__text"><b>Wet Asphalt</b><span>North Arcade</span></span><span class="pl__eq" aria-hidden="true"><i></i><i></i><i></i></span><span class="pl__len">4:31</span><span class="pl__time" aria-hidden="true"><span data-now>0:00</span><span class="pl__bar"><i data-fill></i></span></span></li>
        <li class="pl__row" data-row data-len="236" style="--a:#f4c9c0;--b:#a8553d"><button class="pl__hit" type="button" aria-label="Play Ring Road by Vela Park"></button><span class="pl__disc" aria-hidden="true"><i class="pl__art" data-art></i></span><span class="pl__text"><b>Ring Road</b><span>Vela Park</span></span><span class="pl__eq" aria-hidden="true"><i></i><i></i><i></i></span><span class="pl__len">3:56</span><span class="pl__time" aria-hidden="true"><span data-now>0:00</span><span class="pl__bar"><i data-fill></i></span></span></li>
      </ol>
      <p class="pl__live" aria-live="polite" data-live></p>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

Change values, colours and text with the controls and watch the animation respond live. Or write in the code yourself. Then download the folder with your changes.

44 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

Or ask your AI assistant for it

With the Animorio connector, Claude Code, ChatGPT, Cursor or VS Code take it from here, guide included, and fit it into your project. Paste this request:

Take “Vinyl playlist” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On white, a light card: “Late Night Drive”, “5 tracks, 19 min” and on the right a round black button with the pause sign. Below, five tracks. The first, “Sodium Lights”, is open on an orange veil: its cover is a record spinning with its grooves and the hole in the middle, next to it the title, “Vela Park”, three jumping bars and the length; below, the counting time and an orange line moving forward. The others are low rows with a small square cover, the title and the length. Tap “Last Tram Home” and the first row closes, its record goes back to a small upright square, and the new one opens with a slight bounce while the cover rounds off and starts to spin. The round button pauses: the icon becomes the triangle, the record slows to a stop, the bars disappear and under the name it reads “Paused at 1:23”. On resuming the record picks up speed again. When the line reaches the end the next track opens by itself, and after the last one it goes back to the first.

How it works

One number per row

Each row has a number from 0 (closed) to 1 (playing), written in a CSS variable. The row’s height, the cover’s size and radius, the title’s place and the opacity of artist, grooves and line are all calc() on that variable: GSAP only animates the number.

The record

The cover is a box with hidden overflow; inside, the image rotates on an endless tween. Start, pause and resume change the tween’s timeScale with another tween, so the record speeds up and slows down instead of snapping. On closing it finishes the turn to the next multiple of 360 and comes back upright.

The time

The state is the track and how much of it has gone, from 0 to 1. A linear tween SONG seconds long moves it forward, writes the line and the time (the real length times the fraction) and at the end opens the next track.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#f0532dThe colour of the track being played, of the line and of the bars.
SONGscript.js3.4How many seconds a track lasts in the demo: on a real site the audio player says it.
SPINscript.js3.2How many seconds the record takes for one turn.

Try them in the Playground

When to use it

On the site of a label, a band, a radio or a record shop, on the page of a playlist or an album, and wherever a list is listened to: the episodes of a podcast, the audio lessons of a course, the chapters of an audiobook.

On phones

The same card, as wide as the screen minus the margins: closed rows are 38 pixels tall and the whole row is the button, long titles are cut with an ellipsis. The card is a little over 300 pixels tall and fits whole in the phone box.

With reduced motion

Nothing starts by itself: the playlist sits paused on the first track, already open. The record does not spin, the bars do not jump and rows open and close at once, with no spring. On pressing play only the time line moves forward.

Pitfalls

  • Tracks, artists and lengths are made up and nothing is heard: on a real site the time, the pause and the end of the track come from the audio element’s events (timeupdate, pause, ended), not from a tween.
  • The demo runs fast: SONG makes each track last a few seconds, while the written time counts the real length.
  • On pause the bars disappear: three low still bars would look like three dots.
  • The covers are colour gradients: with real covers just set the image as the background of the same element.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.2 KB; the libraries: GSAP 28 KB.

Testing

Tested on 25 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

Use it in your own projects and in your clients’ projects. Do not resell it or redistribute it as is. GSAP stays under its own Standard license. Full license.

All components