Skip to content
animorio
IT
All components

Send money button

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

The Send $40 button of an app for sending money to friends, with a single gesture: pressed, it squeezes, the amount leaves the pill and flies along a curve to the recipient’s avatar, which takes it with a little jump while a lime ring closes around it. Under the name the line becomes Paid $40, and the button fills with lime and says Sent with a drawn tick; after a moment it goes back to how it was.

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 money 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 money button whose amount flies to the avatar</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">
    <!-- one gesture: press. A payment card of a money app between friends: the recipient on top, the Send $40 pill
         below. Pressed, the amount leaves the pill and flies along a curve to the avatar, which takes it with a little
         jump while a ring closes around it; the pill turns into Sent with a drawn tick, and after a moment comes back -->
    <section class="pay" data-pay aria-label="Send money to Mara Quill">
      <div class="to">
        <span class="avatar" data-avatar>
          <svg class="ring" viewBox="0 0 64 64" aria-hidden="true">
            <circle class="ring__track" cx="32" cy="32" r="29"></circle>
            <circle class="ring__line" data-ring cx="32" cy="32" r="29"></circle>
          </svg>
          <span class="avatar__face" data-face aria-hidden="true">
            <span class="avatar__shine"></span>
            <span class="avatar__initials">MQ</span>
          </span>
        </span>
        <span class="to__text">
          <span class="to__name">Mara Quill</span>
          <span class="to__note" data-notewin><span class="note" data-note>Dinner at Osteria Lune</span></span>
        </span>
      </div>

      <button class="send" type="button" data-send>
        <span class="send__fill" data-fill aria-hidden="true"></span>
        <span class="send__inner">
          <svg class="tick" data-tickwrap viewBox="0 0 20 20" aria-hidden="true"><path data-tick d="M4.5 10.4 8.3 14 15.6 6.2"></path></svg>
          <span class="send__label" data-win><span class="lab" data-lab>Send</span></span>
          <span class="send__amount" data-amountwin><span class="amount" data-amount>$40</span></span>
        </span>
      </button>
    </section>

    <!-- the flying amount and its curve live on the stage, above everything -->
    <svg class="path" data-pathsvg aria-hidden="true"><path data-path d=""></path></svg>
    <span class="chip" data-chip aria-hidden="true">$40</span>
    <p class="sr" aria-live="polite" data-live></p>

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

25 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 money 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 black background there is only the card of a payment: at the top Mara Quill’s avatar, a dark circle with initials and a highlight, the name and, below it, a grey line, Dinner at Osteria Lune; at the bottom, as wide as the card, the white Send $40 button. On hover the button lifts by a pixel and the amount leans slightly to the right, ready to go. Pressed, it squeezes and springs back; the amount leaves the pill as a small lime green tag and flies along a curve that rises and bends towards the avatar, tilting a little in the direction it travels and getting smaller as it arrives, while behind it a dashed line marks the way it has come. Meanwhile, in the button, the amount’s place closes and the label fades to grey. When the amount arrives the avatar makes a little jump and settles on a spring, a lime ring closes around it in one turn, and the line under the name goes out and makes way for Paid $40 · just now. The button fills with lime from the middle, the word Send goes out and only then Sent comes in, and a tick draws itself beside it. After a moment everything goes back: the tick erases, the lime withdraws, the amount comes back into the pill from below, the ring fades and the dinner line returns. A drawn pointer shows the round by itself until you touch the button.

How it works

The tag takes the place of the amount in the button

The flying tag is born exactly over the pill’s amount, measured with getBoundingClientRect against the stage; the real amount fades in the same frame and its window closes to zero width, so it looks as if it really came off.

A computed Bézier curve

Start and end are the centres of the amount and of the avatar; the control point sits halfway, moved right and up by part of the distance (the ARC knob). An object with t from 0 to 1 on power2.inOut moves the tag along the curve, tilts it a little in the direction it takes and shrinks it towards the end.

The dashed way

The same curve is an SVG path with 5 pixel dashes: the dash pattern only reaches as far as the tag has gone and then becomes a gap as long as the curve, so the line grows behind it and disappears on arrival.

The arrival

The avatar rises 5 pixels and comes back with elastic.out, the face starts at 1.08 and settles, and the ring is a circle whose dash is as long as its circumference, uncovered in 0.75 seconds starting from twelve o’clock.

One label at a time

Send and Sent, the dinner line and the payment line live in windows one line tall: the old one goes up and out, only then the new one comes from below with back.out, and the window widens on the word as actually measured.

Values to change

NameFileDefaultWhat it changes
AMOUNTscript.js40How much money the button sends.
CURRENCYscript.js"$"The currency symbol, in front of the figure.
FLIGHTscript.js0.95How long the amount’s flight to the avatar lasts, in seconds.
ARCscript.js0.6How much the amount’s way curves (0 = straight).
HOLDscript.js1.6How many seconds Sent stays before the button goes back to how it was.
SQUEEZEscript.js0.96How much the button squeezes when you press it (1 = not at all).
TRAILscript.js11 = the dashed line marking the amount’s way, 0 = none.
ACCENTscript.js"#b9f06a"The colour of money that has arrived: the flying amount, the ring and the Sent button.
NOTEscript.js"Dinner at Osteria Lune"The line under the name, before the payment.

Try them in the Playground

When to use it

In the button confirming a payment in an app for splitting costs with friends, in a digital wallet, in a tip to a creator, in a bank app or in a checkout where you pay a person: anywhere money goes from someone to someone else and it helps to see it arrive.

On phones

The same card, as wide as the screen up to 340 pixels, with the space between the avatar and the button shortening on low screens; a finger presses like the mouse and the amount takes the same curve. On a phone there is no hover, so the amount does not lean out before the tap.

With reduced motion

No flight, jumps or squeezes: the amount fades out in the button, the ring fades in already closed, the button turns lime and the labels change with a fade. The drawn pointer does not run.

Pitfalls

  • The flying amount must live on the stage, not inside the button: the button has overflow hidden for the spreading lime and would clip it as soon as it leaves.
  • Positions are measured at the moment of the click, not on load: the demo’s window changes size and the card moves.
  • The amount is measured on the layout (scrollWidth), not on screen: while the button is squeezed the on-screen size is smaller and the window would clip it.
  • The dashes of the way must never turn into a row of round dots: straight 5 pixel dashes with butt caps.
  • Two labels are never together in the same window: the new one starts only once the old one has left.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 7.3 KB; the libraries: GSAP 28 KB.

Testing

Tested on 29 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