Skip to content
animorio
IT
Back to the library

Spinnable album record

Physics, Hover, ImagesGSAP, CanvasMediumCompressed weight: Demo 8.8 KBGSAP + SplitText 31 KBFreeDownload the zip

The albums section of an electronic musician’s site, on grey: the record of the chosen album turns slowly inside its square sleeve, and you can grab it with a finger or the mouse, turn it and throw it: it runs, slows down with friction and goes back to its slow turn. The years at the top change the album: the lines of text leave upwards one after the other, the new record settles and the new lines rise from their masks.

Rebuilt from scratch studying paulkalkbrenner.net by Holographik, Ilja van Eck: the idea is theirs; code, copy and images are ours. Read how it’s made

The code

A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN.

<!doctype html>
<!--
  "Spinnable album record" 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 album record you spin with your finger</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>
  <!-- the recordings section of a musician's site: the record of the chosen album spins slowly,
       grab it and throw it, pick a year and the album changes -->
  <main class="stage" data-stage>
    <header class="top">
      <h2 class="label">Recordings</h2>
      <p class="intro">Explore the latest releases.</p>
    </header>

    <section class="albums" data-albums>
      <div class="visual" data-visual>
        <div class="visual__item" data-visual-item="low-season" data-active>
          <div class="sleeve" data-sleeve></div>
          <div class="record" data-record>
            <div class="record__spin" data-spin>
              <div class="record__art" data-art></div>
              <div class="record__grooves"></div>
              <div class="record__label"><span>Kasimir Tessmar</span><span>Low Season</span></div>
            </div>
            <div class="record__shine"></div>
            <div class="record__hole"></div>
          </div>
        </div>
        <div class="visual__item" data-visual-item="static-bloom">
          <div class="sleeve" data-sleeve></div>
          <div class="record" data-record>
            <div class="record__spin" data-spin>
              <div class="record__art" data-art></div>
              <div class="record__grooves"></div>
              <div class="record__label"><span>Kasimir Tessmar</span><span>Static Bloom</span></div>
            </div>
            <div class="record__shine"></div>
            <div class="record__hole"></div>
          </div>
        </div>
        <div class="visual__item" data-visual-item="night-freight">
          <div class="sleeve" data-sleeve></div>
          <div class="record" data-record>
            <div class="record__spin" data-spin>
              <div class="record__art" data-art></div>
              <div class="record__grooves"></div>
              <div class="record__label"><span>Kasimir Tessmar</span><span>Night Freight</span></div>
            </div>
            <div class="record__shine"></div>
            <div class="record__hole"></div>
          </div>
        </div>
      </div>

      <div class="info">
        <nav class="years" aria-label="Albums by year">
          <div class="years__list">
            <button class="year" data-trigger="low-season" data-active><span class="roll">2025</span></button>
            <button class="year" data-trigger="static-bloom"><span class="roll">2019</span></button>
            <button class="year" data-trigger="night-freight"><span class="roll">2016</span></button>
          </div>
          <a class="all" href="#" onclick="return false"><span class="roll">View all albums</span>
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3 10h13M11 5l5 5-5 5"/></svg></a>
        </nav>

        <div class="texts">
          <article class="text" data-info-item="low-season" data-active>
            <h3 class="title" data-text>Low Season</h3>
            <div class="mid">
              <p class="avail" data-text>Available as:<br>CD &amp; 12” vinyl and digital</p>
              <p class="body" data-text>Eleven tracks made in a shuttered seaside hotel over two winters, with the windows open. Slow kicks, long pads and the hum of an empty ballroom.</p>
            </div>
            <div class="buttons"><a class="btn" href="#" onclick="return false"><span class="roll">Listen</span></a><a class="btn" href="#" onclick="return false"><span class="roll">Buy vinyl</span></a></div>
          </article>
          <article class="text" data-info-item="static-bloom">
            <h3 class="title" data-text>Static Bloom</h3>
            <div class="mid">
              <p class="avail" data-text>Available as:<br>Double 12” vinyl and digital</p>
              <p class="body" data-text>Recorded live to tape in one take per track, with a broken spring reverb that gave the record its name. The loudest album he has made.</p>
            </div>
            <div class="buttons"><a class="btn" href="#" onclick="return false"><span class="roll">Listen</span></a><a class="btn" href="#" onclick="return false"><span class="roll">Buy vinyl</span></a></div>
          </article>
          <article class="text" data-info-item="night-freight">
            <h3 class="title" data-text>Night Freight</h3>
            <div class="mid">
              <p class="avail" data-text>Available as:<br>12” vinyl and digital</p>
              <p class="body" data-text>The first album, written on night trains between Berlin and the coast. Drum machines, a borrowed synth and the rhythm of the rails.</p>
            </div>
            <div class="buttons"><a class="btn" href="#" onclick="return false"><span class="roll">Listen</span></a><a class="btn" href="#" onclick="return false"><span class="roll">Buy vinyl</span></a></div>
          </article>
        </div>
      </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="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/SplitText.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.

46 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 “Spinnable album record” 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 a grey background, “Recordings” at the top left and “Explore the latest releases.” on the right. Below, on the left, the square sleeve of Kasimir Tessmar’s first album, “Low Season”: a beam of light in the fog of an empty room, with the grain of a photograph. Over the sleeve sits the record, a circle at 90% with a thin grey ring, showing the same picture a little larger and turning slowly, one turn in fifteen seconds; it has fine grooves, two rings between the tracks, the pale label with the name and the grey hole in the middle. The light of the room stays still on the record while the picture turns underneath. Grabbed with a finger or the mouse, the record dips a hair and follows the angle of the pointer around the centre; let go with a quick flick it runs at up to 720 degrees a second, slows down with friction and, when it is almost still, goes back to its slow turn; let go gently it comes back up with a small bounce. On the right, at the top, the three years (2025, 2019, 2016), the ones not chosen paler, a black rule and “View all albums” with its arrow; below, the album title, “Available as:” with the formats, the text and two buttons, “Listen” and “Buy vinyl”. Over a year the digits rise and give way to their copy; over the buttons a black fill rises crooked and straightens. Clicking another year, the lines of text leave upwards one after the other, the old record fades out and the new one fades in a little larger and settles, still, then slowly picks up speed; the new lines rise from their masks. The autopilot pointer throws the record, changes year, throws it backwards and moves on to the other albums.

How it works

One sleeve, two layers

The sleeve is a square with the picture; the record is a circle at 90% with hidden overflow, holding the same picture at 111.5%, centred: as it turns, the record’s picture slides over the still one of the sleeve and you can see it spin. The pictures are three canvas drawings, made once with their grain.

Angle and speed, on the ticker

Each record has an angle and a speed, updated in GSAP’s ticker. At rest the speed eases towards 360/15 degrees a second; after a throw it drops by 400 degrees a second every second, and below 36 it goes back to the slow turn.

The drag

With pointer events and setPointerCapture the angle between the pointer and the centre comes from atan2; on every move the record turns by the difference, corrected when it wraps past 180 degrees. On release the speed is measured over the last 100 ms and clamped to ±720.

Changing album

The text is split into lines with SplitText, each in its own mask. The old lines go to yPercent -110 with a 0.04 stagger in half a second, the old record fades, the new one fades in at 0.15 s coming down from a scale of 1.035, then the new lines rise from 110. All power3.inOut.

Values to change

NameFileDefaultWhat it changes
SPIN_SECONDSscript.js15How many seconds the record takes for a full turn when nobody touches it.
MAX_SPEEDscript.js720The highest speed of a throw, in degrees per second.
RESISTANCEscript.js400The friction: by how many degrees per second it slows down every second after a throw.
RESUME_BELOWscript.js36Below this speed the record goes back to its slow turn.
LINE_STAGGERscript.js0.04The delay between one line of text and the next when the album changes.
SWITCH_TIMEscript.js0.6How many seconds the new album’s lines take to come in.
SETTLEscript.js0.035How much bigger the new record is before it settles.
GROOVESscript.js0.5How visible the grooves on the record are.

Try them in the Playground

When to use it

For the discography of a musician, a label or a dj, or any round product to show among a few: something you can touch and throw invites you to stay, and the years as tabs keep the choice short.

On phones

The record sits on top and the text below; you spin it with a finger (the page does not scroll while you hold it), the text stops at three lines and “View all albums” is just its arrow.

With reduced motion

The record does not turn by itself and has no inertia: you can still turn it with a finger and it stops where you leave it. Changing album is a fade, and without the fake pointer the albums change by themselves every four seconds.

Pitfalls

  • atan2 jumps from 180 to -180 when the pointer passes left of the centre: without correcting the difference the record would do a full turn backwards.
  • The release speed must be measured over the last 100 ms, not the last move: a finger that stops before lifting would give a random throw.
  • On the phone the record needs touch-action: none, otherwise the finger scrolls the page instead of turning it.
  • The still light must sit outside the layer that turns, otherwise it turns with it and the record looks like a rotated photo.

Libraries

GSAP 3.15.0, SplitText (GSAP) 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 8.8 KB; the libraries: GSAP + SplitText 31 KB.

Testing

Tested on 26 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 animations