Skip to content
animorio
IT
All components

Send progress button

Buttons, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.7 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On a very light grey sits the white card of Quillstone, an invented newsletter tool: the envelope icon, «Weekly digest» and the line for issue 47, then two rows split by thin rules, the recipients, 1,284 subscribers, and the email subject. At the bottom the black «Send to 1,284» pill with a drawn paper plane. Pressing it squeezes it slightly and shortens its shadow; on release the label rises and disappears and the pill stretches into a thin bar as wide as the card, which turns grey and starts filling with black. Above the bar «Sending…» and the count appear, «312 of 1,284», with the digits in rolling columns: the bar runs at first, slows down, picks up again, pauses for a moment like a hesitating network and reaches the end slowly. When the bar is full the black turns green and the bar closes into a short pill that swells with a small bounce, the check draws itself inside and «Sent» appears; the pill drops by one pixel and comes back, and below, in grey, «Sent at 10:42 to everyone». After a couple of seconds the pill goes back to black and wide with its label. A drawn pointer presses the button by itself and starts again; it also really works, with mouse, finger and keyboard.

How it works

One button, three shapes

There 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.

A fake network

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.

Rolling digits

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.

The green pill

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.

Values to change

NameFileDefaultWhat it changes
RECIPIENTSscript.js1284How many people the newsletter goes to: the count runs up to here.
SEND_TIMEscript.js3.4How many seconds the send takes, from the empty bar to the full one.
SPRINGscript.js0.6How long the spring takes to stretch the pill into a bar and close it again.
HOLDscript.js2.4How many seconds the green pill stays before going back to the button.
DONE_COLORscript.js#16a34aThe colour of the pill once sent.
INKscript.js#0a0a0aThe colour of the button and of the filling bar.
SENT_TIMEscript.js10:42The time written below once sent.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • The pill is centred with left: 50% and GSAP’s xPercent: a translate in the CSS would be wiped by GSAP’s inline transform.
  • The count’s units change every frame: without a 130 millisecond limit their column spins and nothing can be read.
  • The pill’s widths are measured after document.fonts.ready: measured earlier, with the fallback font, the pill stayed narrow and the label overflowed.

Libraries

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.

Testing

Tested on 26 October 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components