
The elastic button
Buttons, Hover, Text
A podcast player, on black, in the style of product interface pieces: the progress bar is split into the episode’s chapters, with small gaps between them. Hovering a chapter lifts and widens its segment on a spring and shows its title and length above; dragging, the head clicks onto the start of each chapter, and the cover and its shadow take the colour of the chapter that is playing.
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>
<!--
"Podcast chapters player" 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>The podcast player with chapters that rise on the bar</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" data-stage>
<!-- a podcast player whose progress bar is split into its chapters: hovering a chapter lifts and widens it on a
spring and shows its title above; dragging, the head clicks from one chapter to the next and the cover takes
the chapter's tint -->
<section class="card" data-card aria-label="Low Orbit podcast player">
<div class="head">
<div class="cover" data-cover aria-hidden="true">
<svg viewBox="0 0 64 64">
<circle class="cover__dot" cx="22" cy="42" r="3.2"></circle>
<path class="cover__arc" data-arc d="M22 33.5a8.5 8.5 0 0 1 8.5 8.5"></path>
<path class="cover__arc" data-arc d="M22 25a17 17 0 0 1 17 17"></path>
<path class="cover__arc" data-arc d="M22 16.5a25.5 25.5 0 0 1 25.5 25.5"></path>
</svg>
<span class="cover__shine"></span>
</div>
<div class="meta">
<p class="meta__show">Low Orbit <span>by Fernwick Audio</span></p>
<h1 class="meta__title">How cities sound at 3 a.m.</h1>
<p class="meta__chapter"><span class="meta__lab">Chapter</span><span class="roll"><span data-chap>Cold open</span></span></p>
</div>
</div>
<div class="track" data-track>
<div class="tip" data-tip aria-hidden="true">
<span class="tip__in" data-tip-in><b data-tip-name>Cold open</b><i data-tip-len>2:10</i></span>
</div>
<div class="bar" data-bar role="slider" tabindex="0" aria-label="Episode position" aria-valuemin="0" aria-valuemax="2550" aria-valuenow="0" aria-valuetext="0:00, Cold open"></div>
<span class="knob" data-knob aria-hidden="true"></span>
</div>
<div class="times">
<span data-now>0:00</span>
<span data-left>-42:30</span>
</div>
<div class="controls">
<button class="btn btn--skip" data-back aria-label="Back 15 seconds">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5.6 9.2A7.4 7.4 0 1 1 4.8 14"></path><path d="M5.3 4.6v4.8h4.8"></path></svg>
<small>15</small>
</button>
<button class="btn btn--play" data-play aria-label="Play">
<svg viewBox="0 0 24 24" aria-hidden="true"><path data-pp-a d=""></path><path data-pp-b d=""></path></svg>
</button>
<button class="btn btn--skip" data-fwd aria-label="Forward 30 seconds">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M18.4 9.2A7.4 7.4 0 1 0 19.2 14"></path><path d="M18.7 4.6v4.8h-4.8"></path></svg>
<small>30</small>
</button>
<button class="btn btn--speed" data-speed aria-label="Playback speed 1x"><span class="roll"><span data-speed-lab>1x</span></span></button>
</div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.
31 values to change
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 “Podcast chapters player” from Animorio and fit it into my siteEach chapter is a segment whose weight equals its seconds. On every frame the script divides the bar’s width, minus the gaps, in proportion to the weights: change one weight and all the others move by themselves.
The chapter under the pointer wants a bigger weight and a 10-pixel height. Each segment has two springs of its own, with stiffness and damping from the values block, chasing these targets: the segment widens just past the mark and settles, while its neighbours narrow.
Dragging, the finger’s point becomes a time inside the chapter underneath. If the finger is within ten pixels of a chapter’s start, the time is exactly that start, and the head gets a knock on its spring: you feel the click.
The label follows the chapter’s centre, kept inside the bar. When the chapter changes the old text leaves in a tenth of a second and only then the new one comes in: two titles are never readable in the same place.
The tint of the cover and the shadows is a CSS variable, --tinta, that GSAP slides from one chapter’s colour to the next. The play triangle and the pause bars are the same two quadrilaterals, their points mixed by a single number.
| Name | File | Default | What it changes |
|---|---|---|---|
SHOW | script.js | Low Orbit | The name of the podcast. |
EPISODE | script.js | How cities sound at 3 a.m. | The episode title. |
GROW | script.js | 1.6 | How much the chapter under the pointer widens (1 = stays the same). |
LIFT | script.js | 10 | The height in pixels of the chapter under the pointer (the bar is 4 tall). |
STIFFNESS | script.js | 520 | The stiffness of the chapters’ spring: higher, quicker. |
DAMPING | script.js | 30 | The spring’s damping: lower, bouncier. |
GAP | script.js | 4 | The gap in pixels between one chapter and the next. |
SNAP | script.js | 10 | How many pixels from a chapter’s start the head clicks onto it. |
TINT_TIME | script.js | 0.6 | The seconds the cover takes to turn the new chapter’s colour. |
For a podcast app or site, an audiobook in chapters, the recording of a lecture or a meeting, a long video with its chapters: anywhere a progress bar also has to say where you are in the story.
The card is sized on width and height with clamp and min across vw and vh, so it fits whole even in a low box. With a finger, dragging works like the mouse; the chapter label shows while dragging and goes when you let go.
No springs or knocks: the chapters change size at once, the label and the names fade, the colour changes without sliding, the cover’s arcs stay still and the drawn pointer stays hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.9 KB; the libraries: GSAP 28 KB.
Tested on 30 October 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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
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.