Skip to content
animorio
IT
All components

Podcast chapters player

Players, HoverGSAP, CSS onlyMediumCompressed weight: Demo 8.9 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

31 values to change

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 “Podcast chapters player” 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 black stands the card of Low Orbit, an invented podcast by Fernwick Audio, with the episode How cities sound at 3 a.m.: the square cover with a signal drawn in three arcs, the title, the chapter playing, then the progress bar, the times and the controls. The bar is not a single line: it is split into the episode’s five chapters, Cold open, The night bus, Shift change at the bakery, Listening to bridges and Before the first tram, each as long as it lasts, with four pixels of empty space between them. Hovering a chapter lifts its segment from 4 to 10 pixels and widens it on a spring, taking room from its neighbours, which narrow and rise just a little; above appears a small label with the title and the length, which follows the chapter and changes its text by letting the old one leave before the new one arrives. Dragging, the head follows the finger and clicks onto the start of each chapter when it passes close, with a small knock; when the playing chapter changes, the cover, its shadow and the card’s shadow slide into the chapter’s colour, the name under the title rolls and the chapter’s segment lights up faintly in its colour. Play turns into pause with the two halves of the triangle becoming bars, back and forward spin their icon with a flick, the speed rolls from 1x to 1.5x to 2x, and while it plays the cover’s arcs breathe one after the other. A drawn pointer does it all by itself and starts again; it also really works, with mouse, finger and keyboard.

How it works

Five segments, as long as they last

Each 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.

One spring for weight and one for height

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.

The head that clicks into place

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 that never overlaps

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 chapter’s colour

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.

Values to change

NameFileDefaultWhat it changes
SHOWscript.jsLow OrbitThe name of the podcast.
EPISODEscript.jsHow cities sound at 3 a.m.The episode title.
GROWscript.js1.6How much the chapter under the pointer widens (1 = stays the same).
LIFTscript.js10The height in pixels of the chapter under the pointer (the bar is 4 tall).
STIFFNESSscript.js520The stiffness of the chapters’ spring: higher, quicker.
DAMPINGscript.js30The spring’s damping: lower, bouncier.
GAPscript.js4The gap in pixels between one chapter and the next.
SNAPscript.js10How many pixels from a chapter’s start the head clicks onto it.
TINT_TIMEscript.js0.6The seconds the cover takes to turn the new chapter’s colour.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • With the segment widths written by GSAP as percentages, widening one chapter pushed the last one out of the bar: the weights are normalised every frame on the real width, minus the gaps.
  • The label with its text swapped in one go briefly showed two titles overlapping: the old one leaves completely before the new one comes in.
  • The time from the finger’s point must be worked out on the segments as they are in that frame, already widened: with the resting sizes the head jumped ahead while the chapter grew.

Libraries

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.

Testing

Tested on 30 October 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