
The star rating
Ratings, SVG, Hover
The album card of an invented music app, Murmur, in a dark studio with a warm light and grain, like a Dribbble shot: the sleeve is a real photograph of the sea at sunset, with the sun just above the horizon and a wave breaking against the light, with the record half out of it, turning slowly. Press Save to library and a copy of the sleeve lifts off, shrinks and slides on an arc into the little stack of the library, the albums under it step down and sink by a pixel, the count rolls from 128 to 129 albums, the plus bends into a check and a wave of warm light runs across the grooves of the vinyl.
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>
<!--
"Save to library button" 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 Save to library button with the album sliding into the stack</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 album page of a music app (Murmur): the sleeve with the record half out of it, and the Save to library
button. Pressed, a copy of the sleeve slides on an arc into the little stack of the library, the albums under
it sink, the count rolls by one, the plus becomes a check and a ring of light runs across the record. Pressed
again, the album leaves the library -->
<div class="fit" data-fit>
<section class="card" data-card aria-label="Low Tide Hymns, album">
<span class="card__light" data-light aria-hidden="true"></span>
<span class="card__edge" aria-hidden="true"></span>
<div class="art" aria-hidden="true">
<div class="vinyl" data-vinyl>
<div class="vinyl__disc" data-disc>
<span class="vinyl__grooves"></span>
<canvas class="vinyl__label" data-label></canvas>
</div>
<span class="vinyl__sheen"></span>
<span class="vinyl__wave" data-wave></span>
<span class="vinyl__hole"></span>
</div>
<div class="sleeve" data-sleeve>
<canvas class="sleeve__photo" data-cover></canvas>
<span class="sleeve__paper"></span>
</div>
</div>
<div class="info">
<p class="eyebrow"><svg class="eyebrow__mark" viewBox="0 0 16 16" aria-hidden="true"><path d="M2 9.5c1.6 0 1.6-3 3.2-3s1.6 5 3.2 5 1.6-7 3.2-7 1.6 5 2.4 5"/></svg>Murmur<span class="eyebrow__sep">·</span>New album</p>
<h1 class="title" data-album>Low Tide Hymns</h1>
<p class="meta"><span data-artist>Ines Varga</span> · 2026 · 9 songs, 38 min</p>
<button class="save" type="button" data-btn data-autoclic aria-pressed="false">
<span class="save__body" data-body>
<span class="save__fill" data-fill aria-hidden="true"></span>
<span class="save__light" aria-hidden="true"><span class="save__light-spot" data-spot></span></span>
<span class="save__sweep" aria-hidden="true"><span class="save__sweep-band" data-sweep></span></span>
<span class="save__edge" aria-hidden="true"></span>
<span class="save__row">
<span class="save__icon" data-icon aria-hidden="true">
<svg viewBox="0 0 24 24"><path data-mark d="M7 12 L17 12 M12 7 L12 17"/></svg>
</span>
<span class="save__words" aria-hidden="true">
<span class="save__word" data-word>Save to library</span>
<span class="save__word" data-word>Saved to library</span>
</span>
<span class="save__sr" data-label-text>Save to library</span>
</span>
</span>
</button>
<div class="lib">
<div class="pile" data-pile aria-hidden="true"></div>
<div class="lib__text">
<span class="lib__name">Your library</span>
<span class="lib__count"><span class="odo" data-odo></span><span class="lib__unit">albums</span></span>
</div>
</div>
</div>
<div class="ghost" data-ghost aria-hidden="true"><canvas data-ghost-canvas></canvas><span class="ghost__shine" data-ghost-shine></span></div>
</section>
</div>
<p class="sr" aria-live="polite" data-live></p>
<!-- the photographs of the sleeves, drawn on the canvases by script.js -->
<div hidden>
<img data-photo src="marea.webp" alt="">
<img data-photo src="viola.webp" alt="">
<img data-photo src="prato.webp" alt="">
<img data-photo src="foschia.webp" alt="">
<img data-photo src="brace.webp" alt="">
</div>
</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.
29 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 “Save to library button” from Animorio and fit it into my siteThe covers are real CC0 photographs, in webp in the demo’s folder and loaded with hidden img tags so the load event waits for them. Each one is drawn once on a canvas, cut square around its point (the sun for the big sleeve); over it a warm vignette, a dark veil at the top so the name reads and the film grain, a noise canvas made once pixel by pixel and laid on in overlay mode, then the type in the variable typeface.
The card has two shapes, wide (680 by 316) and narrow (320 by 410), and script.js scales it to fit the page; the box around it takes the scaled size. So every pixel in the CSS stays true and the flight is worked out in the card’s own pixels, dividing getBoundingClientRect by the scale.
A single value t from 0 to 1 with power3.inOut drives a quadratic Bézier curve between the centre of the sleeve and the centre of the stack, with the control point above; the scale falls faster at the start (t to the power 0.75) and the rotation follows a sine, so the cover tilts halfway and arrives straight.
Each album in the stack has a step (6 pixels up, 10% smaller, a shade on top that gets darker). On arrival each one moves to the next step with two keyframes: first a pixel lower, then up with a spring; the fourth fades away, and the new cover settles from 3 pixels higher with an elastic.
Every digit is a column of two rounds of 0 to 9 behind a mask one line high: it always rolls forward and at the end jumps unseen back to the first round; the digits start from the right, staggered. The plus and the check are the same SVG path with the same number of points, and GSAP tweens its d attribute.
Over the grooves sits a radial gradient with a bright ring at radius --r, in screen mode and masked by the grooves themselves; GSAP carries --r from 16% to 104% while the vinyl comes out 12 pixels on a spring and its turn speeds up with timeScale and then slows. The light on the vinyl, a conic-gradient, does not turn with it.
| Name | File | Default | What it changes |
|---|---|---|---|
ALBUM | script.js | Low Tide Hymns | The album title, on the card and on the sleeve. |
ARTIST | script.js | Ines Varga | The artist, on the card and on the sleeve. |
COUNT | script.js | 128 | How many albums are in the library before saving. |
FLIGHT | script.js | 0.85 | Seconds the sleeve takes to slide into the stack. |
SPRING | script.js | 1 | How springy the moves are: 0.4 calm, 2 very bouncy. |
SPIN | script.js | 7 | Seconds for one turn of the vinyl. |
HOLD | script.js | 3.2 | Seconds the album stays saved before the loop takes it out again. |
AUTO | script.js | true | Goes round by itself until someone touches it. |
--amber | style.css | #ffa45e | The accent: the button disc, the saved light, the wave on the vinyl. |
--page | style.css | #09090b | The studio around the card. |
For a music app or site, an online record shop, a label, a podcast or audiobook platform, and for any “save to favourites” in a catalogue with covers (books, films, games): it shows where the saved thing goes and how many there are.
On the phone the card switches to its narrow shape: the sleeve with the vinyl on top, the title, the button and the stack below; it scales to fit the screen. There is no hover, so the light under the finger turns on at the touch, the rest is the same.
Nothing moves: the vinyl stands still, the cover does not fly but fades in on top of the stack, the other albums take their step at once, the count changes in place, the plus becomes a check without turning and the wave is only a glow that comes and goes.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 5 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.
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.