
The inchworm menu
Menus, Hover, Transitions
The small card of a shoe from an invented shop, Arlo Runners, with a real photo of the white sneaker and sizes 39 to 45: 42 is sold out and struck through by a thin line. Tapping it, ‘Add to bag’ springs into an orange ‘Notify me when it’s back’ button; pressed, it opens into an email field typed letter by letter, then closes back into ‘You’re on the list’ with a check that draws itself and a swinging bell, while 42 takes a thin ring labelled ‘Watching’.
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>
<!--
"Back in stock 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 Notify me when it’s back button with the size that lights up</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>
<!-- a small product card of an invented running shoe shop. Size 42 is sold out: picking it turns Add to bag into
Notify me when it's back; pressed, the button opens into an email field, then closes into You're on the list
and size 42 keeps a thin ring that says Watching -->
<article class="shoe" data-wrap aria-label="Arlo Runners, Glow Low sneaker">
<figure class="shoe__pic">
<img class="shoe__img" data-img src="scarpa.webp" width="770" height="430" alt="A white low top sneaker with a glowing sole on a light background">
<span class="shoe__shine" aria-hidden="true"></span>
</figure>
<div class="shoe__info">
<div class="shoe__row">
<p class="shoe__brand">Arlo Runners</p>
<p class="shoe__price">$148</p>
</div>
<p class="shoe__name">Glow Low <span class="shoe__colour">Chalk white</span></p>
</div>
<div class="sizes">
<div class="sizes__head">
<span class="sizes__label">Size <span class="sizes__unit">EU</span></span>
<span class="sizes__read" data-read aria-live="polite"><span>41 in stock</span></span>
</div>
<div class="sizes__grid" data-grid role="radiogroup" aria-label="Size">
<span class="sizes__sel" data-sel aria-hidden="true"></span>
<span class="sizes__watch" data-watch aria-hidden="true"><span class="sizes__ring"></span><span class="sizes__tag">Watching</span></span>
<button class="size" type="button" role="radio" aria-checked="false" data-size="39">39</button>
<button class="size" type="button" role="radio" aria-checked="false" data-size="40">40</button>
<button class="size" type="button" role="radio" aria-checked="true" data-size="41">41</button>
<button class="size is-out" type="button" role="radio" aria-checked="false" data-size="42" aria-label="42, sold out">
<span class="size__n">42</span>
<svg class="size__strike" viewBox="0 0 10 10" preserveAspectRatio="none" aria-hidden="true"><line x1="0.6" y1="9.4" x2="9.4" y2="0.6"/></svg>
</button>
<button class="size" type="button" role="radio" aria-checked="false" data-size="43">43</button>
<button class="size" type="button" role="radio" aria-checked="false" data-size="44">44</button>
<button class="size" type="button" role="radio" aria-checked="false" data-size="45">45</button>
</div>
</div>
<div class="cta is-add" data-cta>
<span class="cta__body" data-body aria-hidden="true"><span class="cta__skin"></span></span>
<button class="cta__btn" type="button" data-btn>
<span class="cta__words" data-words>
<span class="cta__word" data-word="add">
<svg class="ic" viewBox="0 0 20 20" aria-hidden="true"><path d="M4.6 7.2h10.8l-.8 9.1a1.4 1.4 0 0 1-1.4 1.3H6.8a1.4 1.4 0 0 1-1.4-1.3Z"/><path d="M7.4 8.6V6.1a2.6 2.6 0 0 1 5.2 0v2.5"/></svg>
<span class="cta__text">Add to bag</span>
</span>
<span class="cta__word" data-word="notify">
<svg class="ic" viewBox="0 0 20 20" aria-hidden="true"><g data-bell-a><path d="M5.6 13.6V9.4a4.4 4.4 0 0 1 8.8 0v4.2l1.3 1.5H4.3Z"/><path d="M8.5 16.9a1.6 1.6 0 0 0 3 0"/></g></svg>
<span class="cta__text">Notify me when it’s back</span>
</span>
<span class="cta__word" data-word="done">
<svg class="ic ic--check" viewBox="0 0 20 20" aria-hidden="true"><path data-check pathLength="1" d="M5.2 10.4l3.2 3.2 6.6-7"/></svg>
<span class="cta__text">You’re on the list</span>
<svg class="ic ic--bell" viewBox="0 0 20 20" aria-hidden="true"><g data-bell-b><path d="M5.6 13.6V9.4a4.4 4.4 0 0 1 8.8 0v4.2l1.3 1.5H4.3Z"/><path data-clapper d="M8.5 16.9a1.6 1.6 0 0 0 3 0"/></g></svg>
</span>
</span>
</button>
<form class="cta__field" data-field novalidate>
<svg class="cta__mail" viewBox="0 0 20 20" aria-hidden="true"><rect x="3.2" y="5" width="13.6" height="10" rx="2"/><path d="M3.8 6.2l6.2 4.6 6.2-4.6"/></svg>
<span class="cta__input-wrap">
<input class="cta__input" data-input type="email" inputmode="email" autocomplete="email" placeholder="Your email" aria-label="Email for the restock alert" tabindex="-1">
<span class="cta__mirror" data-mirror aria-hidden="true"></span>
<span class="cta__caret" data-caret aria-hidden="true"></span>
</span>
<button class="cta__send" type="submit" data-send aria-label="Notify me" tabindex="-1">
<span class="cta__send-face" data-send-face>
<svg class="cta__arrow" data-arrow viewBox="0 0 20 20" aria-hidden="true"><path d="M4.5 10h10.4M10.6 5.6 15 10l-4.4 4.4"/></svg>
<svg class="cta__spin" data-spin viewBox="0 0 20 20" aria-hidden="true"><path d="M10 4a6 6 0 0 1 6 6"/></svg>
</span>
</button>
</form>
</div>
</article>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.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.
33 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 “Back in stock button” from Animorio and fit it into my siteThe button is a body (.cta__body) that GSAP squashes and stretches on springs, and inside it a skin (.cta__skin) that takes the colour, border and shadows of each state from the is-add, is-notify, is-field and is-done classes through a CSS transition. So GSAP's transform never wipes out the CSS one, and the colours stay in the stylesheet.
The three labels (with their icons) sit in the same grid cell, one over the other: the width is that of the longest and each stays centred. On a state change the old one leaves upwards with a 3 px blur and the new one rises from below with back.out(2).
The frame of the chosen size is a single element that moves to the new cell by reading offsetLeft and offsetWidth: first it stretches towards the target in 0.16 s, then it settles with elastic.out. The positions are read again on resize, even mid loop, like the Watching ring.
The email field is a real input: the pilot changes its value letter by letter with a tween on a number. The drawn caret sits after the last letter by measuring the text in an invisible mirror span with the same face; when a person taps the field it goes out and leaves the real caret.
The check has pathLength 1 and draws itself by taking stroke-dashoffset from 1 to 0. The bell swings on damped keyframes (20, -16, 11, -7, 4 degrees) around its hook, and the clapper moves a little later, the other way. The ring on 42 comes in from scale 1.35 with elastic.out and the Watching label drops by 5 px.
| Name | File | Default | What it changes |
|---|---|---|---|
SOLD_OUT | script.js | 42 | The sold out size, between 39 and 45: it is struck through and choosing it turns the button into Notify me. |
START_SIZE | script.js | 41 | The size chosen at the start, between 39 and 45. |
EMAIL | script.js | maya.okafor@hey.com | The email the autopilot types into the field. |
ACCENT | script.js | #f0531c | The one accent colour: the Notify me button, the Watching ring, the check. |
TYPE | script.js | 0.055 | The seconds per letter of the email typed by the pilot. |
WOBBLE | script.js | 1 | How much the button squashes and bounces when it changes state: 0 = none, 2 = double. |
PAUSE | script.js | 1.1 | The seconds the autopilot waits between one gesture and the next. |
LOOP | script.js | true | Repeats the autopilot's loop. |
For the product page of a shoe shop, a clothing store or anything with sizes or variants: when a size runs out, instead of a dead button it collects the email of whoever wants it, without leaving the card.
The same animation with adapted sizes: the card is almost as wide as the screen, the photo and the size cells get shorter with the height, the button drops to 50 px on short screens; a finger picks the size, opens the field and gets the email keyboard.
Nothing moves: the size frame, the button's labels, the field, the check and the Watching ring change with a fade, the email appears whole and the drawn arrow is not there.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 5 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.