
The star rating
Ratings, SVG, Hover
The Snooze button of a made-up alarm app, Lull: the alarm rings at 7:00 and the pill is amber. Pressed, it squashes on a spring, the time rolls digit by digit to 7:09, the pill turns graphite and a thin nine-minute ring is drawn inside and starts running out, while a small drawn z rises just once. Another Snooze adds nine minutes (7:18) and the ring fills back up; when it runs out the alarm rings again. Stop sets everything back to 7:00. Minimal style, on black.
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>
<!--
"Snooze 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>Snooze button</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 Snooze button of a made-up alarm app, Lull: the alarm is ringing at 7:00. Snooze rolls the time to 7:09,
a thin ring of nine minutes starts to run out inside the pill and a small z rises once. Snooze again adds
nine more (7:18) and the ring grows back. When it runs out, the alarm rings again. Stop sets it all back. -->
<div class="alarm" data-wrap>
<div class="clock" aria-hidden="true">
<span class="clock__sub"><span class="roll" data-subroll><span>Ringing · Weekdays</span><span>Next ring</span><span>Ringing again</span></span></span>
<span class="clock__time" data-time></span>
</div>
<div class="row">
<button class="pill" type="button" data-snooze data-autoclic aria-describedby="lull-live">
<span class="pill__bg" data-bg aria-hidden="true"></span>
<span class="pill__dark" data-dark aria-hidden="true"></span>
<span class="pill__gloss" aria-hidden="true"></span>
<span class="pill__ring" aria-hidden="true">
<svg viewBox="0 0 24 24" data-ringsvg>
<circle class="ring__track" cx="12" cy="12" r="9"></circle>
<circle class="ring__run" data-run cx="12" cy="12" r="9" pathLength="1" transform="rotate(-90 12 12)"></circle>
<path class="ring__bell" data-bell d="M8.6 14.6h6.8l-.9-1.3v-2.6a2.5 2.5 0 0 0-5 0v2.6Z M11 16.3a1 1 0 0 0 2 0"></path>
</svg>
<svg class="zed" viewBox="0 0 10 12" data-zed><path d="M2 2.5h6L2 9.5h6" pathLength="1"></path></svg>
</span>
<span class="pill__text">
<span class="roll" data-labelroll><span>Snooze</span><span>Snoozed · <b data-mins>9</b> min</span></span>
</span>
</button>
<button class="stop" type="button" data-stop>Stop</button>
</div>
<p class="sr" id="lull-live" aria-live="polite" data-live>Alarm ringing, 7:00.</p>
</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.
24 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 “Snooze button” from Animorio and fit it into my siteEach digit of the time sits in a 1em window holding a strip from 0 to 9: GSAP moves the strip by -10% per unit (yPercent), with power3.inOut, and the digits start from the right, 0.07 seconds apart. Digits that don’t change stay still.
An SVG circle with pathLength=1 and stroke-dasharray 1 1, turned -90 degrees once and for all with the transform attribute: nothing spins, only stroke-dashoffset changes. GSAP’s ticker takes dt/MINUTE off the minutes left and the ring is 1 − left/total. A new Snooze adds nine minutes, the total becomes the minutes left and the ring fills back up in 0.6 seconds.
The amber and graphite grounds are two layers under the label: GSAP scales only them (1.04 on hover with an elastic, 0.95 by 0.9 when pressed), so the label never wobbles. The label’s width is a CSS variable, --w, inside font-variation-settings, moved with quickTo.
On Snooze the graphite layer goes to opacity 1 and the colour of the text and ring turns amber; when the minutes run out it goes back to amber, the bell swings around its hook with svgOrigin and the pill shakes with x keyframes.
A z drawn in a single stroke: stroke-dashoffset from 1 to 0 in 0.35 seconds while it rises 22 pixels and fades. With autoRound off, so GSAP doesn’t round the stroke to 0 or 1.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 7 | The alarm hour |
SNOOZE | script.js | 9 | The minutes of each Snooze |
MINUTE | script.js | 0.45 | How many seconds a minute lasts in the demo |
ROLL | script.js | 0.55 | The seconds of the rolling digits |
SPRING | script.js | 1 | How much the pill bounces |
WIDEN | script.js | 112 | The label width on hover |
IDLE | script.js | 1.2 | Seconds before the demo starts by itself |
In an alarm or timer app, a morning weather or calendar widget, any reminder that can be put off.
Same animations; on touch there is no hover widening, the press is there. Sizes scale with the screen and the row fits in 341 pixels.
No rolling digits, no z, no shaking: time and labels change in place with a fade, colours cross-fade and the ring still runs out.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.3 KB; the libraries: GSAP 28 KB.
Tested on 20 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.