
The inchworm menu
Menus, Hover, Transitions
The Upgrade to Pro button of Sablo, a made-up notes app, on black: a matte graphite pill. Held down, a sheet of brushed silver is stamped onto it from left to right, like the foil a printer presses onto a card: the hot edge of the die runs on its front, the label stays pressed into the metal and a small ring counts the hold. Let go too early and the foil lifts and peels back. Held to the end, the foil is stamped: the pill swells and settles, a light runs across the silver, the label rolls to You’re Pro, the badge gets its tick and the plan opens below with its three perks.
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>
<!--
"Upgrade to Pro foil 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 Upgrade to Pro button with the silver foil stamped as you hold it</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>
<!-- the Upgrade to Pro button of Sablo, a made-up notes app: hold it and a sheet of brushed silver foil is
stamped onto the matte pill from left to right, as a printer stamps foil onto a card. Let go too early and
the foil peels back; hold to the end and it is stamped, the label becomes You're Pro and the plan opens below -->
<div class="fit" data-fit>
<div class="col">
<button class="btn" type="button" data-btn aria-describedby="hint" aria-label="Hold to upgrade to Sablo Pro">
<span class="btn__matte" aria-hidden="true">
<span class="btn__glint" data-glint></span>
</span>
<!-- the foil: the same pill in brushed silver, revealed by a clip from the left -->
<span class="foil" data-foil aria-hidden="true">
<span class="foil__brush"></span>
<span class="foil__band" data-band></span>
<span class="foil__edge" data-edge></span>
</span>
<!-- two copies of the content: light on the matte, dark and debossed on the foil -->
<span class="face face--matte" data-face-matte aria-hidden="true">
<svg class="badge" viewBox="0 0 24 24"><path class="badge__hex" d="M12 2.6 20.1 7.3v9.4L12 21.4 3.9 16.7V7.3z"/><path class="badge__p" d="M10 16.2V8h3.1a2.5 2.5 0 0 1 0 5H10"/><path class="badge__tick" data-tick-matte d="M8.2 12.3l2.6 2.6 5-5.3"/></svg>
<span class="label"><span class="label__win" data-win-matte><span class="label__a">Upgrade to Pro</span><span class="label__b">You’re Pro</span></span></span>
<span class="hold" data-hold-matte><svg viewBox="0 0 20 20"><circle class="hold__track" cx="10" cy="10" r="7.5"/><circle class="hold__fill" data-ring cx="10" cy="10" r="7.5" pathLength="100"/></svg><span class="hold__word">Hold</span></span>
</span>
<span class="face face--foil" data-face-foil aria-hidden="true">
<svg class="badge" viewBox="0 0 24 24"><path class="badge__hex" d="M12 2.6 20.1 7.3v9.4L12 21.4 3.9 16.7V7.3z"/><path class="badge__p" data-p-foil d="M10 16.2V8h3.1a2.5 2.5 0 0 1 0 5H10"/><path class="badge__tick" data-tick-foil d="M8.2 12.3l2.6 2.6 5-5.3"/></svg>
<span class="label"><span class="label__win" data-win-foil><span class="label__a">Upgrade to Pro</span><span class="label__b">You’re Pro</span></span></span>
<span class="hold" data-hold-foil><svg viewBox="0 0 20 20"><circle class="hold__track" cx="10" cy="10" r="7.5"/><circle class="hold__fill" cx="10" cy="10" r="7.5" pathLength="100" style="stroke-dashoffset:0"/></svg><span class="hold__word">Hold</span></span>
</span>
</button>
<p class="hint" id="hint" data-hint>Press and hold to stamp</p>
<!-- the plan, opening under the stamped button -->
<section class="plan" data-plan aria-hidden="true" aria-label="Sablo Pro">
<div class="plan__in" data-plan-in>
<div class="plan__head">
<span class="plan__name">Sablo Pro</span>
<span class="plan__price"><b>$8</b><span>/ month, billed yearly</span></span>
</div>
<ul class="plan__perks">
<li data-perk><svg viewBox="0 0 16 16"><path d="M3.5 8.4l2.9 2.9 6.1-6.4"/></svg>Unlimited notebooks and history</li>
<li data-perk><svg viewBox="0 0 16 16"><path d="M3.5 8.4l2.9 2.9 6.1-6.4"/></svg>Offline sync on every device</li>
<li data-perk><svg viewBox="0 0 16 16"><path d="M3.5 8.4l2.9 2.9 6.1-6.4"/></svg>Shared spaces for up to 5 people</li>
</ul>
</div>
</section>
<p class="sr" aria-live="polite" data-live></p>
</div>
</div>
<!-- the drawn pointer of the autopilot -->
<svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2v15.6l4.3-4.1 2.7 6.2 2.6-1.1-2.7-6.1h5.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.
31 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 “Upgrade to Pro foil button” from Animorio and fit it into my siteThe button holds two copies of the same content: a light one on the graphite and a dark one pressed into the silver. A single CSS variable, --p from 0 to 1, clips the silver and the dark face from the left with clip-path inset and the light face from the other side, so the border between them is always the same front.
The foil is a slanted gradient of five silvers, with a repeating-linear-gradient of one pixel lines in overlay on top for the brushing, an inner shade below and a white thread above. The pressed label has a light text-shadow below and a dark one above, the trick of blind stamping.
On press GSAP takes --p from where it is to 1 in HOLD seconds times what is left, so a second press starts again where the foil peeled. The hot edge and the light read the same position. Letting go early, another tween takes --p back to 0 with power2.in, faster the less foil there was.
At 1 one timeline: the edge flares and goes, the pill goes to BUMP and back with elastic.out, a blurred band of light crosses the silver, the two label windows rise one line together with back.out, the P fades and the tick draws itself with stroke-dashoffset, and the plan opens from zero height to its size.
Pointer capture keeps the press even if the finger slides off; Space and Enter do the same with keydown and keyup without repeats. The drawn pilot calls the same functions and stops at the visitor’s first real gesture.
| Name | File | Default | What it changes |
|---|---|---|---|
HOLD | script.js | 1.35 | Seconds to hold before the foil is fully stamped. |
PEEL | script.js | 0.55 | Seconds for the foil to peel back when you let go too early. |
BUMP | script.js | 1.035 | How much the pill swells when the foil is stamped (1 = not at all). |
SPRING | script.js | 1 | How springy the pill, the label and the plan are. |
GLINT | script.js | 0.55 | How bright the light crossing the silver is. |
PRICE | script.js | 8 | The monthly price of the plan, in dollars. |
IDLE | script.js | 1.2 | Seconds before the drawn pointer starts by itself. |
LOOP | script.js | true | Left alone, the pilot does the round again. |
On an app’s pricing page or settings, in an account, in a gentle paywall: the button to move to the paid plan, where holding avoids the accidental click. Without the plan below it suits any important confirmation, like publishing or sending.
The same animation: the finger holds just like the mouse (pointer capture holds even if the finger slides), and if button and plan do not fit the screen minus 24 pixels the script scales them down just enough, recalculating on resize.
Nothing moves: the foil does not slide in but fades in while you hold, the pill does not swell, the label changes without rolling and the plan fades in already open.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.6 KB; the libraries: GSAP 28 KB.
Tested on 14 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.