
The elastic button
Buttons, Hover, Text
The packing list of a travel app, on black: each ticked thing adds its weight, the kilo figure rolls and the bar moves towards the notch of the flight’s limit. Go past it and everything turns red, the bar jolts and the line says by how much you are over; take something out and it settles again.
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>
<!--
"Packing list" 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>Packing list</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 packing list of a travel app: every ticked thing adds its weight, the bar fills towards the
airline's limit and turns red once the bag is over it -->
<section class="pk" data-pk aria-labelledby="pk-title">
<header class="pk__head">
<div>
<h1 id="pk-title">Lisbon, 4 days</h1>
<p class="pk__sub">Cabin bag, <span data-limit>10</span> kg limit</p>
</div>
<p class="pk__total"><span class="pk__plus" data-plus aria-hidden="true"></span><b data-total>0.0</b><i>kg</i></p>
</header>
<div class="pk__meter" data-meter aria-hidden="true"><span class="pk__bar" data-bar></span><span class="pk__mark" data-mark></span></div>
<p class="pk__room"><span data-room></span></p>
<ul class="pk__list">
<li class="pk__row" data-row data-kg="1.6">
<button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Laptop, 1.6 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
<span class="pk__name">Laptop</span>
<span class="pk__kg">1.6 kg</span>
</li>
<li class="pk__row" data-row data-kg="1.1">
<button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Camera, 1.1 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
<span class="pk__name">Camera</span>
<span class="pk__kg">1.1 kg</span>
</li>
<li class="pk__row" data-row data-kg="0.9">
<button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Jacket, 0.9 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
<span class="pk__name">Jacket</span>
<span class="pk__kg">0.9 kg</span>
</li>
<li class="pk__row" data-row data-kg="1.4">
<button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Boots, 1.4 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
<span class="pk__name">Boots</span>
<span class="pk__kg">1.4 kg</span>
</li>
<li class="pk__row" data-row data-kg="0.8">
<button class="pk__pick" type="button" role="checkbox" aria-checked="false" aria-label="Pack Books, 0.8 kilos" data-pick><span class="pk__fill" data-fill></span><svg viewBox="0 0 16 16" aria-hidden="true"><path data-tick pathLength="1" d="M3.900 8.400l2.700 2.700 5.600-6"></path></svg></button>
<span class="pk__name">Books</span>
<span class="pk__kg">0.8 kg</span>
</li>
</ul>
<span class="pk__say" data-say aria-live="polite"></span>
</section>
<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.
29 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 “Packing list” from Animorio and fit it into my siteThe real weight is the sum of the ticked rows plus BASE; the shown one is a number a tween takes towards the real one, and figure and bar are drawn from it.
The bar is as long as the limit plus a fifth, so the overweight has room to show; the notch sits at the limit.
A class on the card changes a single CSS variable and with it bar, figure, line and glow; on first crossing the bar gives an elastic jolt.
The fill scales on a spring, the tick draws itself with the dashoffset and beside the figure a “+1.6” rises and fades.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #4f9bff | The colour of the ticks and of the bar while the weight is within the limit. |
OVER | script.js | #ff5c50 | The colour used when the bag goes over the limit. |
LIMIT | script.js | 10 | The bag’s weight limit, in kilos. |
BASE | script.js | 5.5 | How much the bag weighs before adding the things in the list, in kilos. |
SPRING | script.js | 1 | How much the ticks and the bar bounce: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer fills the bag until it is over the limit, then takes out and swaps. |
In a travel or airline app, next to the booking; and wherever a list has a ceiling not to exceed: a shopping budget, a meal’s calories, a van’s room, the hours of a day.
The same card, 292 pixels wide at most: the rows are 36 pixels tall and the whole row is the target, the large weight stays at the top right and everything fits a short screen.
The ticks appear at once, the figure and the bar go to the new value without rolling and the red arrives without the jolt. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.3 KB; the libraries: GSAP 28 KB.
Tested on 23 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.