
The inchworm menu
Menus, Hover, Transitions
The «Boost post» button under a post on Loop, a made-up social app: hold it and the pill fills from the left like rising pressure, the estimated reach rolls from 1.2k to 18.4k people and the daily budget steps up, $5, $10, $20. Let go before the end and it springs back; hold to the end and it launches: the pill squashes and stretches, a ring leaves its edges and the label becomes «Boosted · 2 days» with a bolt drawing itself, and Undo beside it. Minimal style, on white, one electric blue.
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>
<!--
"Boost post 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>Boost post 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">
<!-- the Boost button under a post of a made-up social app, Loop: hold it and the pill fills like rising pressure,
the estimated reach rolls up and the budget steps up; let go early and it springs back, hold to the end and it launches -->
<section class="post" data-post aria-label="Post by Mara Okafor">
<header class="post__head">
<span class="post__avatar" aria-hidden="true">MO</span>
<span class="post__who">
<span class="post__name">Mara Okafor</span>
<span class="post__meta">@maraokafor · 2h</span>
</span>
<span class="post__chip">Ceramics studio</span>
</header>
<p class="post__text">The new studio on Calle Luna opens this Saturday. First wheel class is free, coffee is on us.</p>
<ul class="post__stats" aria-label="Post stats">
<li><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2.5 13.5V8.5M6.2 13.5V4.5M9.8 13.5V7M13.5 13.5V2.5"/></svg><span>3.1k</span><span class="sr">views</span></li>
<li><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 3.5h10a1 1 0 0 1 1 1v6a1 1 0 0 1-1 1H7.5L4.5 14v-2.5H3a1 1 0 0 1-1-1v-6a1 1 0 0 1 1-1Z"/></svg><span>31</span><span class="sr">comments</span></li>
<li><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M2.5 7V6a2 2 0 0 1 2-2h8.5M11 2l2 2-2 2M13.5 9v1a2 2 0 0 1-2 2H3M5 14l-2-2 2-2"/></svg><span>12</span><span class="sr">reposts</span></li>
</ul>
<div class="boost">
<div class="boost__row">
<span class="boost__label">Est. reach</span>
<span class="boost__reach"><span data-reach>1.2k</span><span class="boost__people">people</span></span>
<span class="boost__budget" data-budget-box><span class="roll" data-budget><span class="roll__line">$5</span></span><span class="boost__per">/day</span></span>
</div>
<div class="pill-wrap">
<span class="ring" data-ring aria-hidden="true"></span>
<button class="pill" type="button" data-pill data-autoclic aria-describedby="hint">
<span class="pill__face" data-face>
<span class="pill__fill" data-fill aria-hidden="true"></span>
<span class="pill__label" data-label-base>
<svg class="pill__arrow" data-arrow viewBox="0 0 16 16" aria-hidden="true"><path d="M8 13V3.4M3.8 7.4 8 3.2l4.2 4.2"/></svg>
<span class="roll" data-text><span class="roll__line">Boost post</span></span>
</span>
<span class="pill__label pill__label--on" data-label-on aria-hidden="true">
<svg class="pill__arrow" data-arrow-on viewBox="0 0 16 16"><path d="M8 13V3.4M3.8 7.4 8 3.2l4.2 4.2"/></svg>
<span class="roll" data-text-on><span class="roll__line">Boost post</span></span>
</span>
<span class="pill__done" data-done aria-hidden="true">
<svg class="pill__bolt" viewBox="0 0 16 16"><path data-bolt pathLength="1" d="M9.2 1.8 3.6 9h4.1l-1 5.2L12.4 7H8.3l.9-5.2Z"/></svg>
<span>Boosted · <span data-days>2 days</span></span>
</span>
</span>
</button>
</div>
<div class="boost__foot">
<span class="hint" id="hint" data-hint>Hold to boost</span>
<button class="undo" type="button" data-undo tabindex="-1">Undo</button>
</div>
</div>
<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.
39 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 “Boost post button” from Animorio and fit it into my siteThe whole fill is one CSS variable, --p, from 0 to 1: the blue fill is a scaleX(var(--p)) with its origin on the left, and the white label is a copy of the blue one clipped with clip-path: inset(0 calc((1 - var(--p)) * 100%) 0 0). So the white crosses the letters exactly where the blue arrives.
On press GSAP takes p to 1 in 1.6 seconds with power1.in, the rising pressure; on every frame the reach is worked out between 1,200 and 18,400 and the budget takes the matching step. The pointer is captured with setPointerCapture, so sliding off the pill while holding does not stop it.
On release the tween stops and p goes back to 0 with elastic.out(1, 0.45): the pill empties with a small bounce, and the value is kept above zero so the spring never takes it negative.
At 1 the button squashes to 1.045 by 0.9 and springs back, a blue-edged ring grows and fades, the label leaves upwards and «Boosted · 2 days» comes up from below; the bolt draws itself with stroke-dashoffset from 1 to 0 (autoRound off).
Holding Space or Enter does the same gesture (ignoring key repeats); for fingers the pill has touch-action: none and no long-press menu.
| Name | File | Default | What it changes |
|---|---|---|---|
HOLD | script.js | 1.6 | Seconds of holding to fill the pill and launch the boost. |
REACH_FROM | script.js | 1200 | The estimated reach before boosting, in people. |
REACH_TO | script.js | 18400 | The estimated reach with the full boost, in people. |
BUDGETS | script.js | "5,10,20" | The daily budget steps the pill climbs while you hold, in dollars. |
DAYS | script.js | 2 | How many days the boost runs. |
SPRING | script.js | 0.45 | How springy the pill is when you let go early (lower = more bounce). |
LOOP_PAUSE | script.js | 2.4 | Seconds the boosted state stays before the loop undoes it. |
Under a post in a social app or in the panel of whoever runs a brand’s social accounts: promoting a post, sponsoring an ad, pushing a blog article. It suits any action that costs money and wants more confirmation than a single click.
Everything is in em and the size depends on both the width and the height of the window, so the post with its pill fits the phone box. A finger holds just like the mouse.
No springs or movement: the pill fills and empties without bouncing, the arrow stays still, labels crossfade and the ring does not appear.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP 28 KB.
Tested on 25 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.