
The elastic button
Buttons, Hover, Text
An app’s storage cleanup in a card on white: how much is used, a bar and four things to tick, large files, duplicate photos, old downloads and cache. Ticking one makes the total to free count inside the button and turns the matching piece of the bar blue. “Free up” removes it: the bar shortens, the space used counts down and the cleaned rows turn to “Clean” one after the other.
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>
<!--
"Storage cleanup" 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>Storage cleanup</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 storage cleanup of an app: the things to tick, the total to free counting, the part of the bar
that will go and, after the button, the bar shortening and the rows turning clean -->
<section class="sc" data-sc aria-label="Free up space">
<header class="sc__head"><strong>Free up space</strong><span class="sc__used"><b data-outused>46.8</b> of 64 GB</span></header>
<div class="sc__bar" aria-hidden="true"><i class="sc__fill" data-fill><i class="sc__go" data-go></i></i></div>
<ul class="sc__list" data-list></ul>
<button type="button" class="sc__btn" data-btn aria-disabled="true">
<span class="sc__face" data-face="idle">Select what to remove</span>
<span class="sc__face" data-face="go">Free up <span data-outsel>0.0</span> GB</span>
<span class="sc__face" data-face="done"><svg viewBox="0 0 16 16" aria-hidden="true"><path pathLength="1" d="m3.600 8.400 2.900 2.900 5.900-6.600"></path></svg>Freed <span data-outfreed>0.0</span> GB</span>
</button>
</section>
<span class="live" aria-live="polite" data-live></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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>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.
19 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 “Storage cleanup” from Animorio and fit it into my siteThe space used and the space picked to be freed. Animating them rewrites the figures at the top and in the button, the bar’s width and that of the blue piece, which is a part of the bar anchored to its right end.
Every row is a button with role checkbox: ticking it colours the box and the tick is drawn with stroke-dashoffset.
“Select what to remove” while nothing is picked, “Free up” with the total, and “Freed” afterwards: they sit on top of each other and swap.
The picked number goes to zero and the used one drops by the same amount, so the blue piece closes while the bar shortens; the cleaned rows change one after the other.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #2f6fe0 | The colour of the ticked boxes and of the piece of bar to be freed. |
GOOD | script.js | #128a5e | The colour of what has been cleaned. |
COUNT | script.js | 0.7 | How many seconds the numbers take to count. |
SPRING | script.js | 1 | How much the boxes and the button bounce. |
LOOP | script.js | true | Left alone, the demo’s pointer ticks three items, frees the space and starts again. |
In the settings of a photo app, a cloud drive or a phone, when space is running out; the same tickable list with its total in the button carries subscriptions to cancel, notifications to switch off, emails to archive or the items to drop from a quote.
The card is at most 348 pixels wide and about 310 tall, and narrows with the screen: long names truncate with an ellipsis. The rows are 44 pixels tall and can be tapped anywhere; the button is 44 tall.
No running counts and no bounces: ticking an item shows the new numbers, bar and tick at once; freeing the space shows the bar already shorter and the rows already “Clean”. The button’s fades stay. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.8 KB; the libraries: GSAP 28 KB.
Tested on 30 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.