
The inchworm menu
Menus, Hover, Transitions
The product row of a made-up home shop, Harrow & Loom: the Waffle Merino Throw with its price, three colours as small squares with a waffle weave and four sizes. Below, the stock meter: a thin bar of ten segments that shortens or grows segment by segment when the variant changes, each with a small bounce, the number rolling in “Only 4 left in Sage”, the tone moving from the black of In stock to the amber of the last few to the grey of sold out, and the delivery line saying Ships in 1–2 days or Back Dec 12. Sold out, Notify me opens into an email field inside the line and becomes We’ll email you with a tick drawing itself. Minimal style.
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>
<!--
"Stock meter" 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>Stock meter</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 product row of a made-up home shop, Harrow & Loom: name, price, three colours, four sizes and, below,
the stock meter: ten thin segments, the stock line and the delivery line. Out of stock, Notify me opens an email field -->
<section class="card" data-card aria-labelledby="p-name">
<header class="head">
<p class="maker">Harrow & Loom</p>
<div class="title-row">
<h2 class="name" id="p-name" data-name>Waffle Merino Throw</h2>
<p class="price" aria-live="polite"><span class="sr" data-price-sr>$148</span><span class="roller" data-price aria-hidden="true"></span></p>
</div>
</header>
<div class="group">
<div class="label"><span>Colour</span><span class="label__val" data-colour-name>Oat</span></div>
<div class="swatches" role="radiogroup" aria-label="Colour" data-swatches></div>
</div>
<div class="group">
<div class="label"><span>Size</span><span class="label__val" data-dims>130 × 170 cm</span></div>
<div class="sizes" role="radiogroup" aria-label="Size" data-sizes>
<span class="sizes__mark" data-mark aria-hidden="true"></span>
</div>
</div>
<div class="stock" data-stock>
<div class="meter" data-meter aria-hidden="true"></div>
<div class="line" data-line aria-live="polite"></div>
<div class="sub" data-sub></div>
</div>
</section>
</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.
28 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 “Stock meter” from Animorio and fit it into my siteThe bar is a grid of ten segments, each with a fill inside that GSAP takes to scaleX 1 or 0. When stock goes up they fill left to right 45 milliseconds apart and each segment hops in height with elastic.out; when it goes down they empty from the last one, and the segment left at the end settles by a pixel.
Bar and word share the --tono variable on the card. GSAP takes it from the black of In stock to the amber of the last few or the grey of sold out in half a second, so segments and words change colour together, with no dot beside them.
Each digit of the price and the stock is a 0 to 9 column inside a one-line window: to change digit the column moves with yPercent and back.out. When the Only N left line comes in fresh, the digit starts from the previous number and rolls to the new one.
The stock line and the delivery line are one-cell grids: the new line sits over the old one, the old one leaves upwards in 0.2 seconds and the new one comes in from below just after. The email field enters the same way, while the line’s height goes from one line of text to 38 pixels on a spring.
| Name | File | Default | What it changes |
|---|---|---|---|
PRODUCT | script.js | Waffle Merino Throw | The product name above the price. |
SEGMENTS | script.js | 10 | How many segments the bar has: one per piece, full beyond this number. |
LOW_AT | script.js | 5 | From how many pieces down the line turns amber and says Only N left. |
SEG_TIME | script.js | 0.32 | How long a segment takes to fill or empty. |
STAGGER | script.js | 0.045 | The delay between one segment and the next. |
SPRING | script.js | 1.6 | How far the size mark overshoots and comes back. |
TONE_TIME | script.js | 0.5 | How long the tone change between black, amber and grey takes. |
SHIP_TEXT | script.js | Ships in 1–2 days | The delivery line when the product is in stock. |
On the product page of an online shop, under the price and the variants: homeware, clothing, shoes, cosmetics, anything with colours and sizes holding different stock, or for event tickets with seat bands.
The card takes the width with a margin, the four sizes sit in a grid that tightens and heights and gaps also follow the window height with clamp, so with the email field open everything fits the preview box. Touch replaces hover.
No hops or springs: segments fill at once with a fade, new lines fade in without moving, digits change in place, the tick is already drawn and the self-running preview does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.6 KB; the libraries: GSAP 28 KB.
Tested on 21 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.