
The elastic button
Buttons, Hover, Text
A small warehouse’s inventory as a table on white: for every product its name and code, how many pieces there are out of how many fit, a bar and the state written in colour, “In stock”, “Low” or “Out”. The “Receive” button records the incoming delivery: the count climbs, the bar follows it, and the moment it passes the threshold the label rolls into “In stock” and the summary at the top updates.
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>
<!--
"Inventory table" 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>Inventory table</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 inventory of a small warehouse: the product rows, the stock bar, Receive making the count
climb and the label going from Low to In stock -->
<section class="iv" data-iv aria-label="Inventory">
<header class="iv__head"><strong>Inventory</strong><span class="iv__sum"><span data-outsum>2 low · 1 out</span></span></header>
<table class="iv__table">
<thead><tr><th scope="col">Product</th><th scope="col">Stock</th><th scope="col"><span class="sr">Action</span></th></tr></thead>
<tbody data-body></tbody>
</table>
</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.
15 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 “Inventory table” from Animorio and fit it into my siteThe rows are a table with its headers, written by the script from a list: code, name, pieces, capacity, reorder threshold and incoming delivery.
Zero pieces is out, below the threshold is low, above it is fine. The state is an attribute on the row changing one colour variable: the label and the bar take it from there.
Receiving stock animates a number from the old count to the new one. On every frame the count and the bar are rewritten and the state recomputed: the label changes at the exact moment the threshold is passed.
How many rows are low and how many are out is recounted on every state change, and the text rolls only if it changed.
| Name | File | Default | What it changes |
|---|---|---|---|
GOOD | script.js | #128a5e | The colour of “In stock”. |
LOW | script.js | #d48806 | The colour of “Low”. |
OUT | script.js | #d9432f | The colour of “Out”, out of stock. |
COUNT | script.js | 0.9 | How many seconds the count takes to climb when stock arrives. |
SPRING | script.js | 1 | How much the bar and the button bounce. |
LOOP | script.js | true | Left alone, the demo’s pointer receives two deliveries and then starts again. |
In the back office of an online store, a workshop or a warehouse, on the stock page; the same table with its bar and state carries the seats left for several events, the credits of several accounts, the space on several drives or the licences used by several teams.
The card is at most 348 pixels wide and about 290 tall, and narrows with the screen: the table has fixed-width percentage columns and long names truncate with an ellipsis. The buttons are 32 pixels tall inside 50-pixel rows.
No climbing count and no bounces: on delivery the number, the bar and the label are the new ones at once and the button fades to “Done” with the tick already drawn. On entering the bars are already filled. 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.5 KB; the libraries: GSAP 28 KB.
Tested on 29 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.