
The elastic button
Buttons, Hover, Text
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.
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>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
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 siteEach 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 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 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.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #f0532d | The colour of the track being played, of the line and of the bars. |
SONG | script.js | 3.4 | How many seconds a track lasts in the demo: on a real site the audio player says it. |
SPIN | script.js | 3.2 | How many seconds the record takes for one turn. |
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.
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.
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.
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.
Tested on 25 November 2026
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.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.