
The inchworm menu
Menus, Hover, Transitions
The Turn on round-ups button of Pennant, a made-up bank, on black, under the week's spending: a coffee, a train ticket, the groceries. Turned on, each purchase is rounded up to the next euro: the cents light up in mint, a small pill with the spare change comes out of the amount and a coin leaves it, flies in an arc into the savings pot drawn inside the button and drops through its slot. The pot squashes and settles, its level rises with a wave, the total rolls up, and below you read how much was put aside this week. Turned off, the pills go back, the pot drains and the label rolls back.
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>
<!--
"Round-ups 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 Turn on round-ups button with the spare change flying into the savings pot</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>
<!-- the round-ups button of Pennant, a made-up bank: turned on, every purchase of the week is rounded up to the
next euro and the spare change flies, coin by coin, into the savings pot drawn inside the button -->
<div class="fit" data-fit>
<div class="col" data-col>
<section class="card" aria-label="Recent spending">
<header class="card__head">
<span class="card__title">Recent spending</span>
<span class="card__when">This week</span>
</header>
<ul class="rows">
<li class="row" data-row data-amount="3.40">
<span class="row__icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M5 9h11v4.5a5.5 5.5 0 0 1-11 0z"/><path d="M16 10.5h1.6a2.4 2.4 0 0 1 0 4.8H16"/><path d="M8.5 3.8c-.8 1 .8 1.6 0 2.7M12 3.8c-.8 1 .8 1.6 0 2.7"/></svg></span>
<span class="row__text"><span class="row__name">Brava Roasters</span><span class="row__cat">Coffee</span></span>
<span class="row__money"><span class="row__chip" data-chip>+0.60</span><span class="row__amount" data-amt>€3<span class="row__cents">.40</span></span></span>
</li>
<li class="row" data-row data-amount="12.75">
<span class="row__icon" aria-hidden="true"><svg viewBox="0 0 24 24"><rect x="5" y="3.5" width="14" height="13" rx="3.2"/><path d="M5 11h14"/><circle cx="8.6" cy="13.8" r=".9"/><circle cx="15.4" cy="13.8" r=".9"/><path d="M8 20.5l1.6-3.2M16 20.5l-1.6-3.2M8.5 6.6h7"/></svg></span>
<span class="row__text"><span class="row__name">City Rail</span><span class="row__cat">Transport</span></span>
<span class="row__money"><span class="row__chip" data-chip>+0.25</span><span class="row__amount" data-amt>€12<span class="row__cents">.75</span></span></span>
</li>
<li class="row" data-row data-amount="27.15">
<span class="row__icon" aria-hidden="true"><svg viewBox="0 0 24 24"><path d="M4 9.5h16l-1.7 9a2 2 0 0 1-2 1.6H7.7a2 2 0 0 1-2-1.6z"/><path d="M8.5 9.5 11 4.2M15.5 9.5 13 4.2M9.4 13.4v3.2M14.6 13.4v3.2"/></svg></span>
<span class="row__text"><span class="row__name">Fenn Market</span><span class="row__cat">Groceries</span></span>
<span class="row__money"><span class="row__chip" data-chip>+0.85</span><span class="row__amount" data-amt>€27<span class="row__cents">.15</span></span></span>
</li>
</ul>
</section>
<button class="btn" type="button" data-btn aria-pressed="false">
<span class="btn__light" aria-hidden="true"></span>
<span class="pot" data-pot aria-hidden="true">
<svg viewBox="0 0 40 40">
<defs><clipPath id="potclip"><circle cx="20" cy="20" r="13.2"/></clipPath></defs>
<circle class="pot__ring" cx="20" cy="20" r="15"/>
<g clip-path="url(#potclip)">
<rect class="pot__level" data-level x="4" y="34" width="32" height="30"/>
<path class="pot__wave" data-wave d="M2 34 q4.5 -2.4 9 0 t9 0 t9 0 t9 0 t9 0 v30 h-45z"/>
</g>
<path class="pot__slot" d="M15.5 11.6h9"/>
</svg>
<span class="pot__ripple" data-ripple></span>
</span>
<span class="label"><span class="label__win" data-win><span class="label__a">Turn on round-ups</span><span class="label__b">Round-ups on</span></span></span>
<span class="total" data-total aria-hidden="true"><span class="total__win" data-total-win><span class="total__now" data-total-now>€0.00</span></span></span>
</button>
<p class="hint" data-hint><span class="hint__a" data-hint-a>Spare change goes to your Holiday pot</span><span class="hint__b" data-hint-b><b data-saved>€1.70</b> saved this week · Holiday pot</span></p>
<p class="sr" aria-live="polite" data-live></p>
</div>
</div>
<svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2v15.6l4.3-4.1 2.7 6.2 2.6-1.1-2.7-6.1h5.9z"/></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.
40 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 “Round-ups button” from Animorio and fit it into my siteEach row carries its amount in data-amount; the script rounds it up to ROUND_TO euros, subtracts the amount, multiplies by MULTIPLIER and writes the result in the small pill. The sum goes to the total and to the line under the button.
The coin is a disc with a radial gradient. GSAP drives a parameter from 0 to 1 and each frame places it on a quadratic Bézier curve, from the pill to the slot through a high control point, and spins it by squeezing its width with a sine, like a turning coin.
An SVG circle with a clipPath: inside, a dark rectangle and a light wave rising together to the level of the sum divided by GOAL. The wave drifts sideways on the GSAP ticker, faster for a moment after each coin; the pot squashes and springs back with elastic.out and a ring spreads.
At each coin the new figure comes in from below with back.out and the old one leaves upwards, in a one line window with hidden overflow and tabular figures, so the digits do not wobble.
One timeline brings everything back: the label drops, the pills shrink one after the other, the level goes back to zero and the first sentence returns. A click while turning on stops the timeline and removes the coins in flight.
| Name | File | Default | What it changes |
|---|---|---|---|
ROUND_TO | script.js | 1 | How many euros each purchase is rounded up to (1 = the next whole euro). |
MULTIPLIER | script.js | 1 | How many times the spare change is saved (2 = double round-ups). |
GOAL | script.js | 2.5 | The euros that fill the pot to the brim. |
COIN_TIME | script.js | 0.75 | Seconds of each coin's flight. |
STAGGER | script.js | 0.5 | Seconds between one purchase and the next. |
SPRING | script.js | 1 | How springy the pot, the label and the pills are. |
IDLE | script.js | 1.2 | Seconds before the drawn pointer starts by itself. |
LOOP | script.js | true | Left alone, the pilot does the round again. |
In a bank or savings app, on the pots page or right under the list of transactions: the button that turns round-ups on and shows straight away how much is put aside. Without the card above it suits any switch that starts automatic saving.
The same animation: if the card and the button do not fit the screen minus 24 pixels the script scales them down just enough, recalculating on resize, and the coins start and land in the right places even when scaled.
Nothing flies: the pills and the total fade in, the pot fills without squashing or a drifting wave and the label changes without rolling.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.4 KB; the libraries: GSAP 28 KB.
Tested on 14 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.