
The elastic button
Buttons, Hover, Text
A newsletter’s send button, in the clean style of product interface pieces: the black «Send to 1,284» pill stretches into a thin bar that fills like a real network, with the recipient count rolling above it, then closes into a green pill with a self-drawing check and «Sent», and the send time appears below.
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>
<!--
"Send progress 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 Send button that becomes the sending bar</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 send step of a newsletter tool: the black pill stretches into a thin progress bar with a rolling count above it,
then closes into a green pill with a drawn check, and the send time appears below -->
<section class="card" aria-label="Quillstone weekly digest">
<header class="card__head">
<span class="card__icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><rect x="3.5" y="5.5" width="17" height="13" rx="2.5"></rect><path d="m4.5 7.5 7.5 5.5 7.5-5.5"></path></svg>
</span>
<div>
<p class="card__title">Weekly digest</p>
<p class="card__sub">Quillstone · Issue 47, product updates</p>
</div>
</header>
<dl class="card__rows">
<div><dt>Recipients</dt><dd><span data-recipients>1,284</span> subscribers</dd></div>
<div><dt>Subject</dt><dd class="card__subject">Five small things we shipped in October</dd></div>
</dl>
<div class="send-wrap" data-wrap>
<p class="busy-label" data-busy aria-live="polite"><span class="busy-label__word">Sending<span data-dots>…</span></span><span class="busy-label__count"><span class="num" data-count></span> of <span data-total>1,284</span></span></p>
<button class="send" type="button" data-send data-autoclic aria-label="Send to 1,284 subscribers">
<span class="send__track" data-track aria-hidden="true"><span class="send__fill" data-fill></span></span>
<span class="send__face send__face--idle" data-idle>
<svg class="send__plane" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 11.6 19.5 4.8l-4.4 14.7-3.6-5.9Z"></path><path d="m11.5 13.6 8-8.8"></path></svg>
<span>Send to <span data-total>1,284</span></span>
</span>
<span class="send__face send__face--done" data-done>
<svg class="send__check" viewBox="0 0 24 24" aria-hidden="true"><path data-check d="m5.5 12.5 4.2 4.2 8.8-9.4"></path></svg>
<span>Sent</span>
</span>
</button>
</div>
<p class="sent-at" data-at>Sent at <span data-time>10:42</span> to everyone</p>
</section>
<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.
29 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 “Send progress button” from Animorio and fit it into my siteThere is only one button and it changes shape with GSAP: width, height and vertical position, measured in pixels from the label and the card and measured again on resize. Inside it there is a grey track and a fill growing with scaleX: in the black pill they are off, in the bar they light up.
Progress is an object going from 0 to 1 in six stretches, each with its own curve: a fast start, a slow stretch, a pick-up, an almost still hesitation, the arrival with power2.out and the last bit slowly. Every frame writes the fill and the count.
The count is made of columns from 0 to 9, one per figure, moved with yPercent. To keep the units from spinning, the count changes at most every 130 milliseconds and each column rolls in 0.16 seconds with power3.out: so between one change and the next the digits stand still and can be read; when the number of figures changes, from 999 to 1,000, the count rebuilds itself.
With the bar full the fill turns green, the bar closes into the short pill with back.out(1.15), the check draws itself with strokeDashoffset and the pill drops by one pixel and comes back: the settle that says it is done.
| Name | File | Default | What it changes |
|---|---|---|---|
RECIPIENTS | script.js | 1284 | How many people the newsletter goes to: the count runs up to here. |
SEND_TIME | script.js | 3.4 | How many seconds the send takes, from the empty bar to the full one. |
SPRING | script.js | 0.6 | How long the spring takes to stretch the pill into a bar and close it again. |
HOLD | script.js | 2.4 | How many seconds the green pill stays before going back to the button. |
DONE_COLOR | script.js | #16a34a | The colour of the pill once sent. |
INK | script.js | #0a0a0a | The colour of the button and of the filling bar. |
SENT_TIME | script.js | 10:42 | The time written below once sent. |
For the send button of a newsletter or email marketing tool, a message sent to a group, an export of many rows, any long action where the person pressing wants to see how much is left without leaving the page.
The card takes the width of the box minus the margins and the bar follows it, measured in pixels; the button stays 44 pixels tall, easy for a finger, and a tap does what a click does.
The pill neither stretches nor bounces: it switches to a bar and to the green pill at once, the labels change with a fade, the digits are written without rolling, the check appears already drawn and the drawn pointer stays hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.7 KB; the libraries: GSAP 28 KB.
Tested on 26 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.