
The elastic button
Buttons, Hover, Text
The members row of a project, on white, in the style of clean product interface pieces: next to the row of overlapping avatars sits the black Invite button. Pressed, it opens into an email field with a spring while the avatars squeeze to make room; the typed address, once sent, folds into an avatar with the initials that flies in an arc into the row, the others shift and the last one goes into the +3, which rolls to +4. The field closes back into «Invite sent» with a check.
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>
<!--
"Invite team 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 Invite team button with avatars joining</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 members row of an invented project app: the avatar stack and the Invite button live together.
Invite opens into an email field, the address folds into a new avatar that flies into the stack -->
<section class="team" data-card aria-label="Quillbeck project members">
<div class="team__head">
<span class="team__mark" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M5 18.5 12 5l7 13.5Z"></path><path d="M9.2 13.4h5.6"></path></svg>
</span>
<div class="team__text">
<p class="team__name" data-name>Quillbeck</p>
<p class="team__sub">Website redesign</p>
</div>
<span class="team__tag">Members</span>
</div>
<div class="row" data-row>
<div class="stack" data-stack aria-label="Members">
<span class="more" data-more aria-label="more members"><span class="more__in"><span class="more__plus">+</span><span class="more__num" data-num><span data-num-a>3</span><span data-num-b>4</span></span></span></span>
</div>
<div class="invite" data-invite>
<button class="pill" data-pill type="button" aria-expanded="false">
<span class="pill__icon" aria-hidden="true">
<svg viewBox="0 0 24 24">
<g data-plus><path d="M12 6.5v11"></path><path d="M6.5 12h11"></path></g>
<path class="pill__check" data-check d="M6.8 12.4l3.4 3.3 7-7.6"></path>
</svg>
</span>
<span class="pill__label" data-label><span data-label-in>Invite</span></span>
</button>
<form class="field" data-field aria-hidden="true" autocomplete="off">
<svg class="field__mail" viewBox="0 0 24 24" aria-hidden="true"><rect x="3.5" y="6" width="17" height="12" rx="2.5"></rect><path d="m4.5 7.5 7.5 5.5 7.5-5.5"></path></svg>
<input class="field__input" data-input type="email" placeholder="name@company.com" aria-label="Email address" tabindex="-1" spellcheck="false">
<button class="field__send" data-send type="submit" aria-label="Send invite" tabindex="-1">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M5 12h13"></path><path d="m13 6.5 5.5 5.5L13 17.5"></path></svg>
</button>
</form>
</div>
</div>
<p class="team__foot" data-foot><span data-foot-in>4 members, 3 pending</span></p>
</section>
<span class="flier" data-flier aria-hidden="true"></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></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.
21 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 “Invite team button” from Animorio and fit it into my siteEach avatar is a 36-pixel circle moved with x = index times step: 25 pixels at rest, 31 on hover, 15 when the field is open. Changing the step with back.out parts or squeezes the row like a spring, and the +N always sits after the last one.
The field starts as wide as the pill and goes to the width left next to the squeezed row with back.out; the pill fades underneath. The width is recomputed on resize.
The sent text goes into an element that starts where the field’s text is: it narrows to 36 pixels, writes the initials, then flies with a linear x and a y in two legs, up then down, to make the arc, to the first place in the row.
The number has two lines: the old one slides up and the new one comes from below with back.out, while the last avatar shrinks into the circle.
| Name | File | Default | What it changes |
|---|---|---|---|
PROJECT | script.js | Quillbeck | The project name at the top of the card. |
EMAIL | script.js | maya@harrowgate.co | The address the autopilot types and invites. |
ACCENT | script.js | #4f46e5 | The colour of the field, the arrow and the check. |
SPRING | script.js | 0.62 | The seconds the button takes to open into the field. |
FLY | script.js | 0.85 | The seconds of the new avatar’s flight to the row. |
TYPE_SPEED | script.js | 16 | The letters per second the autopilot types. |
HOLD | script.js | 2.4 | The seconds «Invite sent» stays. |
For the settings page of a project app, a team dashboard, a shared workspace, a document to share: anywhere you invite someone and want to see them arrive.
The card takes 92 per cent of the width up to 372 pixels; when open, the field takes the space left next to the squeezed row, never less than 150 pixels. Touch does what a click does and the phone keyboard types into the field.
No springs and no flights: the field opens and closes with a fade, the new avatar appears in its place, the number changes without rolling and the drawn pointer is hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.5 KB; the libraries: GSAP 28 KB.
Tested on 27 October 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.