
The inchworm menu
Menus, Hover, Transitions
The small card of a linen throw from Loam & Lane, a made-up home goods shop, with the full price and a «Show member price» pill. On tap the pill tightens into a circle with a spinning ring, the veil with the lock lifts and the member price comes into focus digit by digit, rolling; the full price is struck through by a line that draws itself, a «Save 20%» lozenge lands on a spring and the pill opens again into «Add to cart · $118.40», which in turn says Added with a tick and comes back. On white, with a single blue accent.
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>
<!--
"Member price 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>Member price button</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">
<!-- a small product card of Loam & Lane, a made-up home goods shop: the full price, and a pill that reveals
the member price. On press the pill tightens into a spinning ring, the member price comes into focus digit
by digit, the old price is struck through, the saving shows in a lozenge and the pill becomes Add to cart -->
<section class="card" data-card aria-label="Waffle linen throw, Loam and Lane">
<span class="card__edge" aria-hidden="true"></span>
<div class="prod">
<span class="thumb" aria-hidden="true">
<svg viewBox="0 0 40 40" data-thumb>
<rect class="throw throw--back" x="7" y="12.5" width="26" height="18" rx="3"/>
<rect class="throw" x="5.5" y="15" width="29" height="17.5" rx="3.2"/>
<path class="weave" d="M9 19.5h22M9 23h22M9 26.5h22"/>
<path class="fringe" d="M8.5 32.5v2.4M12 32.5v2.4M15.5 32.5v2.4M19 32.5v2.4M22.5 32.5v2.4M26 32.5v2.4M29.5 32.5v2.4"/>
</svg>
</span>
<div class="prod__txt">
<p class="brand">Loam & Lane</p>
<h1 class="name">Waffle linen throw</h1>
<p class="meta">Oat · 130 × 170 cm</p>
</div>
</div>
<div class="prices">
<div class="row">
<span class="lab">Price</span>
<span class="full" data-full>
<span class="full__txt">$148.00</span>
<span class="strike" data-strike aria-hidden="true"></span>
</span>
</div>
<div class="row row--member">
<span class="lab lab--member">Member price</span>
<span class="member">
<span class="save" data-save aria-hidden="true"><span class="save__txt" data-save-txt>Save 20%</span></span>
<span class="veil" data-veil aria-hidden="true">
<svg class="lock" viewBox="0 0 16 16"><rect x="3.5" y="7" width="9" height="6.5" rx="1.6"/><path d="M5.5 7V5.3a2.5 2.5 0 0 1 5 0V7"/></svg>
</span>
<span class="roll" data-roll aria-hidden="true"></span>
</span>
</div>
</div>
<button class="pill" type="button" data-pill aria-label="Show member price">
<span class="pill__bg" data-pill-bg aria-hidden="true"></span>
<span class="pill__face" data-face="show"><span class="pill__txt">Show member price</span></span>
<span class="pill__face" data-face="spin" aria-hidden="true">
<svg class="spin" viewBox="0 0 24 24" data-spin><circle class="spin__track" cx="12" cy="12" r="8.5"/><circle class="spin__arc" cx="12" cy="12" r="8.5" pathLength="1"/></svg>
</span>
<span class="pill__face" data-face="add" aria-hidden="true"><span class="pill__txt">Add to cart <span class="dot">·</span> <span data-add-price>$118.40</span></span></span>
<span class="pill__face" data-face="added" aria-hidden="true">
<svg class="tick" viewBox="0 0 16 16"><path d="M3.6 8.4 6.6 11.2 12.4 5" pathLength="1" data-tick/></svg>
<span class="pill__txt">Added</span>
</span>
</button>
<p class="note" data-note>Free for members of the Lane Club.</p>
<p class="sr" aria-live="polite" data-live></p>
</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.
33 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 “Member price button” from Animorio and fit it into my siteThe button has four absolutely positioned faces (Show member price, the ring, Add to cart, Added), all centred with inset 0 and flex: faces swap with a fade and only GSAP sets the width, from the card’s width down to the button’s height for the circle, so a hidden label never widens anything.
Every digit is a window one line tall holding a column from 0 to 9: the column slides down to its digit with yPercent while the blur filter goes from 7 to 0 pixels, the left digits first.
A line one and a half pixels thick over the full price, with scaleX from 0 to 1 and the origin on the left, so the price is struck through as with a pen; at the same moment the price turns grey.
| Name | File | Default | What it changes |
|---|---|---|---|
FULL_PRICE | script.js | 148 | The full price, in dollars. |
DISCOUNT | script.js | 20 | The member discount, in per cent: the member price is worked out from it. |
SPIN_TIME | script.js | 0.9 | Seconds the ring spins before the price comes into focus. |
ROLL_TIME | script.js | 0.75 | Seconds each digit takes to roll into place. |
DIGIT_GAP | script.js | 0.07 | Seconds between one digit and the next. |
BLUR | script.js | 7 | How blurred the hidden price is, in pixels. |
SPRING | script.js | 0.5 | How springy the pill and the lozenge are (lower = more bounce). |
ADDED_HOLD | script.js | 1.4 | Seconds Added stays before going back to Add to cart. |
AUTO_PAUSE | script.js | 1.6 | Seconds the demo waits at the end before it starts over. |
IDLE | script.js | 6 | Seconds after your last touch before the demo plays by itself again. |
On a product page or in the grid of a shop with a membership programme: the member price stays covered until the visitor asks for it, and the button that shows it immediately becomes the one to buy.
Everything is in em and the size depends on both the width and the height of the window, so the whole card fits the phone box. The pill is as tall and wide as the card, easy for a thumb; on touch it squashes and springs back.
No springs, rolling or blur: the circle and the faces change with a fade, the member price appears already in focus and the line strikes the full price in an instant.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.6 KB; the libraries: GSAP 28 KB.
Tested on 1 December 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.