
The inchworm menu
Menus, Hover, Transitions
The invite-a-friend card of Tallow, a made-up savings app: «Give $20, get $20». Below it sits your personal link in a pill, with Copy squashing and turning into «Copied» with a tick drawing itself; then the row of friends you invited, each with an initial in a circle and their state on a label: Priya goes from Invited to Joined, Tomás from Joined to «Earned $20», and the label changes width on a spring while the text rolls. The gift at the top hops, the bar to the free month fills from 1 to 2 of 3 going a pixel past, and the credit rolls from $20 to $40. On white, with a single violet 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>
<!--
"Referral card" 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>Referral card</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- the invite-a-friend card of Tallow, a made-up savings app: give $20, get $20. Your personal link with Copy,
the friends you invited with their state, the bar to the next reward and the credit you have earned -->
<section class="card" data-card aria-label="Tallow, invite friends">
<span class="card__edge" aria-hidden="true"></span>
<header class="head">
<span class="gift" aria-hidden="true">
<svg viewBox="0 0 24 24" data-gift>
<g data-lid>
<rect class="gift__lid" x="3.6" y="8.2" width="16.8" height="4" rx="1.2"/>
<path class="gift__bow" d="M12 8.2c-1.4-3.4-5.4-3.7-5.4-1.4 0 1.2 1.6 1.4 5.4 1.4zM12 8.2c1.4-3.4 5.4-3.7 5.4-1.4 0 1.2-1.6 1.4-5.4 1.4z"/>
</g>
<rect class="gift__box" x="4.8" y="12.2" width="14.4" height="8.4" rx="1.2"/>
<path class="gift__ribbon" d="M12 8.2v12.4"/>
</svg>
</span>
<div class="head__txt">
<p class="brand">Tallow · Rewards</p>
<h1 class="title">Give $20, get $20</h1>
<p class="sub">When a friend makes their first deposit, you both get $20.</p>
</div>
</header>
<!-- the personal link -->
<div class="link">
<span class="link__url" data-url>tallow.app/r/mira-4k2</span>
<button class="copy" type="button" data-copy aria-label="Copy your invite link">
<span class="copy__bg" data-copy-bg aria-hidden="true"></span>
<span class="copy__face" data-cface="copy">
<svg class="ico" viewBox="0 0 16 16" aria-hidden="true"><rect x="5.2" y="5.2" width="8" height="8" rx="1.6"/><path d="M10.8 5.2V4.4c0-.9-.7-1.6-1.6-1.6H4.4c-.9 0-1.6.7-1.6 1.6v4.8c0 .9.7 1.6 1.6 1.6h.8"/></svg>
<span>Copy</span>
</span>
<span class="copy__face" data-cface="done" aria-hidden="true">
<svg class="ico" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.6 8.4 6.6 11.2 12.4 5" pathLength="1" data-ctick/></svg>
<span>Copied</span>
</span>
</button>
</div>
<!-- the friends you invited -->
<ul class="friends" aria-label="Friends you invited">
<li class="friend" data-friend>
<span class="av" style="--av:#e9e3ff;--avt:#4a32c4" aria-hidden="true"><span>L</span></span>
<span class="who"><b>Lena Park</b><small>Joined Nov 18</small></span>
<span class="state" data-state="earned"><span class="state__txt">Earned $20</span></span>
</li>
<li class="friend" data-friend>
<span class="av" style="--av:#f2ede4;--avt:#6b5a3e" aria-hidden="true"><span>T</span></span>
<span class="who"><b>Tomás Ruiz</b><small data-when>Joined today</small></span>
<span class="state" data-state="joined"><span class="state__txt">Joined</span></span>
</li>
<li class="friend" data-friend>
<span class="av" style="--av:#e6f0f4;--avt:#2f5a6b" aria-hidden="true"><span>P</span></span>
<span class="who"><b>Priya Nair</b><small data-when>Invited 2 days ago</small></span>
<span class="state" data-state="invited"><span class="state__txt">Invited</span></span>
</li>
</ul>
<!-- the bar to the next reward -->
<div class="goal">
<p class="goal__txt"><span class="goal__face" data-gface><b class="roll" data-done></b> of 3 to unlock a free month</span></p>
<div class="bar" aria-hidden="true">
<span class="bar__fill" data-fill></span>
<span class="bar__notch" style="left:33.333%"></span>
<span class="bar__notch" style="left:66.666%"></span>
</div>
</div>
<!-- the credit -->
<div class="credit">
<span class="credit__lab">Your credit</span>
<span class="credit__val">$<span class="roll" data-credit></span></span>
</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.
46 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 “Referral card” from Animorio and fit it into my site«Copy» and «Copied» sit on top of each other, absolutely positioned and centred with inset 0 and flex, inside a fixed-width button: changing label the button does not jump and the tick stays centred.
A hidden ruler with the same font measures the new text; GSAP takes the label’s width to that measure on a spring, while the old text leaves upwards and the new one comes in from below. On resize and once the fonts are loaded the widths are measured again.
Each digit of the credit and of the count is a window over a 0-9 column: GSAP moves the column by yPercent −10 per digit with back.out. The leading zero is hidden, so $20 never reads $020.
The bar is a scaleX from 0 to 1: GSAP takes it to the new value plus a pixel and a half (measured on the real width) and then settles it on a spring.
| Name | File | Default | What it changes |
|---|---|---|---|
REWARD | script.js | 20 | Dollars each friend earns you (and them). |
GOAL | script.js | 3 | Friends needed for the free month. |
SPRING | script.js | 0.45 | How springy the labels, the bar and Copy are (lower, more bounce). |
LABEL_TIME | script.js | 0.55 | Seconds a label takes to change. |
BAR_TIME | script.js | 0.9 | Seconds the bar takes to fill. |
SQUASH | script.js | 0.88 | How flat Copy gets when pressed (1 = not at all). |
HOLD | script.js | 2.4 | Seconds the finished state stays before the demo starts over. |
IDLE | script.js | 7 | Seconds after your last touch before the demo plays by itself again. |
On the rewards or profile page of an app, an online bank, a subscription or a shop that rewards people for bringing friends: the link copies with one tap and every friend who moves a step on shows straight away, in the credit and in the bar to the reward.
Everything is in em and the size depends on both the width and the height of the window, so the card fits the phone box whole. Copy and the friend rows are real tap targets, tall enough for a thumb; a link that is too long is cut with an ellipsis.
No springs, squashes or rolling: texts and labels swap with a fade, digits and the bar are at the right value straight away and the gift stays still.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.5 KB; the libraries: GSAP 28 KB.
Tested on 2 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.