
The inchworm menu
Menus, Hover, Transitions
The NPS survey of a made-up app, Tally, in a white card: “How likely are you to recommend Tally to a friend?” with a 0 to 10 scale in eleven tiles. The chosen score fills from the bottom with a colour that slides in a single hue from the warm grey of 0 to the green of 10, the other tiles dim, and the card grows on a spring with the question that depends on the score (What went wrong?, What would make it a 10?, What do you love most?), the answer field and three suggestion pills. Send squeezes the pill and the card closes into a thank-you with a tick drawing itself; Not now folds it into a small Give feedback pill that opens it again. 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>
<!--
"NPS survey" 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>NPS survey</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 NPS survey of a made-up app, Tally: a score from 0 to 10, a follow-up question that depends on the score,
three suggestion pills, Send, and a thank-you. Not now folds the card into a small pill that opens it again -->
<section class="card" data-card aria-labelledby="nps-q">
<div class="card__body" data-body>
<div class="face face--ask" data-face="ask">
<header class="top">
<span class="brand"><svg viewBox="0 0 20 20" aria-hidden="true"><rect x="2.5" y="2.5" width="15" height="15" rx="4.5"></rect><path d="M7 7.6h6M10 7.6v5.6"></path></svg>Tally</span>
<button class="later" type="button" data-later>Not now</button>
</header>
<h2 class="q" id="nps-q" data-question>How likely are you to recommend Tally to a friend?</h2>
<div class="scale" role="radiogroup" aria-labelledby="nps-q" data-scale></div>
<div class="ends" aria-hidden="true"><span>Not likely</span><span>Very likely</span></div>
<div class="more" data-more>
<div class="more__in" data-more-in>
<div class="follow" aria-live="polite">
<span class="follow__line" data-follow>What would make it a 10?</span>
</div>
<label class="field">
<span class="sr">Your answer</span>
<input class="field__input" type="text" data-input placeholder="Tell us in a few words" autocomplete="off">
</label>
<div class="chips" data-chips></div>
<div class="actions">
<span class="count" data-count aria-hidden="true"></span>
<button class="send" type="button" data-send>
<span class="send__bg" aria-hidden="true"></span>
<span class="send__label">Send</span>
<svg class="send__arrow" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.5L12 8l-3.5 3.5"></path></svg>
</button>
</div>
</div>
</div>
</div>
<div class="face face--thanks" data-face="thanks" aria-hidden="true">
<svg class="tick" viewBox="0 0 44 44" aria-hidden="true"><circle cx="22" cy="22" r="19" data-ring pathLength="1"></circle><path d="M14.5 22.6l5.2 5 9.8-10.4" data-check pathLength="1"></path></svg>
<p class="thanks__t">Thanks, that helps.</p>
<p class="thanks__s" data-thanks-s>We read every answer, usually the same week.</p>
<button class="again" type="button" data-again>Change my answer</button>
</div>
</div>
</section>
<div class="pill-wrap"><button class="pill" type="button" data-pill aria-hidden="true" tabindex="-1">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 4.5h10v6H8l-3 2.5v-2.5H3z"></path></svg>
<span>Give feedback</span>
</button></div>
<p class="sr" aria-live="polite" data-live></p>
</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.
30 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 “NPS survey” from Animorio and fit it into my siteThe chosen tile’s colour is a mix of two colours, the warm grey of 0 and the green of 10, in proportion to the score: no traffic light, a single hue warming up towards green. The same colour goes to the thank-you tick through the --tinta variable on the card.
The second-question panel has zero height; its content is measured and GSAP brings the height to it with back.out, so the card, whose height is automatic, follows on a spring. When done the height goes back to auto and the layout stays free.
When the score band changes, the old question leaves upwards in 0.22 seconds and only then does the new one come in from below: at any moment only one can be read. The old pills go before the new ones arrive.
The thank-you sits on top of the question: its height is measured and the card goes from the question’s height to it on a spring, while the circle and the tick draw with strokeDashoffset on pathLength 1 paths with autoRound off.
| Name | File | Default | What it changes |
|---|---|---|---|
APP_NAME | script.js | Tally | The app’s name in the question and the mark. |
LOW_COLOR | script.js | #a79f95 | The colour of a 0. |
HIGH_COLOR | script.js | #2f8f5e | The colour of a 10; the ones in between slide between the two. |
FILL_TIME | script.js | 0.42 | How long the chosen tile takes to fill. |
SPRING | script.js | 1.4 | How far the card overshoots and comes back when it changes height. |
DIM | script.js | 0.42 | The opacity of the tiles not chosen. |
OPEN_TIME | script.js | 0.7 | How long the card takes to grow with the second question. |
MAX_CHARS | script.js | 140 | How many letters the answer can have. |
To ask for an opinion inside an app or a subscription product, after an online purchase, at the end of a course or a stay, or on a newsletter page.
The card takes the width with a margin, the eleven tiles sit in a grid that tightens and sizes and gaps also follow the height with clamp, so with the second question open everything fits the preview box. Touch replaces hover.
No hops or springs: the tile takes its colour at once, the second question and the thank-you fade in, 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.2 KB; the libraries: GSAP 28 KB.
Tested on 20 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.