
The star rating
Ratings, SVG, Hover
The Send €240 button of Halden, a made-up banking app, in smoked glass on a dark desk with light and grain, like a Dribbble shot. A tap is not enough: you hold it, and a mint ring fills around Mara’s avatar while the pill trembles slightly like a phone’s haptics. Let go too soon and the ring springs back and warns you. Held to the end, the lock opens, the amount leaves the pill and flies like a spinning gold coin into the avatar, the pill says Sent to Mara, arrives instantly, and the receipt slides out from under it by a thread.
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>
<!--
"Hold to send 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 hold to send transfer button with the flying coin</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">
<!-- the Send €240 button of Halden, a made-up banking app, in smoked glass on a dark desk with light and grain.
It sends only if you hold it: a mint ring fills around the recipient's avatar while the pill trembles a
little. Let go too soon and the ring springs back. Held to the end, the lock opens, the amount leaves the
pill and flies like a coin into the avatar, the pill says Sent to Mara and the receipt slides out a little -->
<div class="tx" data-wrap>
<span class="tx__spill" data-spill aria-hidden="true"></span>
<div class="tx__receipt" data-receipt aria-hidden="true">
<span class="tx__receipt-paper" data-paper>
<span class="tx__perf"></span>
<span class="tx__line">
<span class="tx__k">Instant transfer</span>
<span class="tx__v">€240.00</span>
</span>
<span class="tx__line tx__line--muted">
<span class="tx__k">Ref HLD 48F2 · Today 16:30</span>
<span class="tx__v">Fee €0.00</span>
</span>
</span>
</div>
<button class="tx__btn" type="button" data-btn aria-label="Send €240 to Mara Okafor. Press and hold to confirm">
<span class="tx__body" data-body>
<span class="tx__fill" aria-hidden="true"></span>
<span class="tx__charge" aria-hidden="true"><span class="tx__charge-light" data-charge></span></span>
<span class="tx__shine" aria-hidden="true"><span class="tx__shine-light" data-shine></span></span>
<span class="tx__sweep" aria-hidden="true"><span class="tx__sweep-band" data-sweep></span></span>
<span class="tx__edge" aria-hidden="true"></span>
<span class="tx__row">
<span class="tx__who" data-who aria-hidden="true">
<svg class="tx__ring" viewBox="0 0 56 56">
<circle class="tx__ring-track" data-track cx="28" cy="28" r="25"/>
<g data-mirror>
<circle class="tx__ring-arc" data-arc cx="28" cy="28" r="25" pathLength="1" transform="rotate(-90 28 28)"/>
</g>
<circle class="tx__ring-pulse" data-pulse cx="28" cy="28" r="25"/>
<g class="tx__sparks" data-sparks>
<line x1="28" y1="-1" x2="28" y2="-6"/>
<line x1="48.5" y1="7.5" x2="52" y2="4"/>
<line x1="57" y1="28" x2="62" y2="28"/>
<line x1="48.5" y1="48.5" x2="52" y2="52"/>
<line x1="28" y1="57" x2="28" y2="62"/>
<line x1="7.5" y1="48.5" x2="4" y2="52"/>
<line x1="-1" y1="28" x2="-6" y2="28"/>
<line x1="7.5" y1="7.5" x2="4" y2="4"/>
</g>
</svg>
<span class="tx__avatar" data-avatar>
<span class="tx__avatar-face">M</span>
</span>
</span>
<span class="tx__text" aria-hidden="true">
<span class="tx__titles">
<span class="tx__title" data-title>Send <span class="tx__amt" data-amt>€240</span></span>
<span class="tx__title" data-title>Sent to Mara</span>
</span>
<span class="tx__subs">
<span class="tx__sub" data-sub>To Mara · hold to confirm</span>
<span class="tx__sub" data-sub>Keep holding</span>
<span class="tx__sub tx__sub--warn" data-sub>Too soon · hold till it closes</span>
<span class="tx__sub tx__sub--ok" data-sub>Arrives instantly · 16:30</span>
<span class="tx__sub" data-sub>Sending to Mara</span>
</span>
</span>
<span class="tx__lock" data-lockwrap aria-hidden="true">
<svg viewBox="0 0 24 24">
<g data-lock>
<path class="tx__shackle" data-shackle d="M8.4 10.6V8.2a3.6 3.6 0 0 1 7.2 0v2.4"/>
<rect class="tx__lock-body" x="6.2" y="10.4" width="11.6" height="8.6" rx="2.4"/>
<path class="tx__keyhole" d="M12 13.6v2"/>
</g>
<path class="tx__tick" data-tick d="M6.8 12.4l3.4 3.4 7-7.2" pathLength="1"/>
</svg>
</span>
</span>
</span>
</button>
<span class="tx__coin" data-coin aria-hidden="true">
<span class="tx__coin-face" data-coinface><span>€</span></span>
</span>
<svg class="tx__cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true">
<path d="M5.2 3.4l13 8.1c.6.4.4 1.3-.3 1.4l-5.3.8-2.6 4.8c-.3.6-1.2.6-1.4-.1L4 4.3c-.2-.7.6-1.3 1.2-.9z"/>
</svg>
</div>
<p class="sr" aria-live="polite" data-live></p>
</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.
37 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 “Hold to send button” from Animorio and fit it into my siteThe pill is a single box (moved only by GSAP) with absolute layers: the smoked glass with a gradient from the top, the radial mint light anchored to the avatar that grows with the press, the light under the pointer driven by two CSS variables through gsap.quickTo, the reflection band and on top the inner shadows of the edge. Under the pill, in a clipping box, the receipt waits moved up by 62 pixels, hidden behind the glass.
A single number P.p goes from 0 to 1 while you hold, with a gsap.ticker adding the elapsed time divided by HOLD_TIME. The arc is a circle with pathLength 1 and its strokeDasharray is the length. Released early, P.p goes back to 0 with an elastic.out and dips below zero: for negative values the arc’s group is mirrored with a matrix and the dash is drawn the other way, so the spring really shows.
In the same ticker the pill moves by fractions of a pixel and turns by hundredths of a degree, summing three fast sines with different frequencies, never a loop that repeats; the amplitude grows with the ring and with SHAKE. The lock’s shackle quivers on a slower sine. At the end the tremble stops with a dry thunk: scale 0.975 for a tenth of a second and back on a spring.
The coin lives outside the pill (which clips) and moves on a quadratic Bézier curve: starting at the centre of the amount, ending at the centre of the avatar, the control point above the pill. Positions are read again with getBoundingClientRect at every frame, so even if the window changes size mid-flight the coin lands right. The spin is scaleX = cosine of time: when it is negative the face switches to the darker tails side.
A timeline brings a drawn pointer onto the pill, presses for a little more than half the time and lets go (the spring and the warning), then holds to the end and leaves. The loop starts from the load event, so poster and video always land on the same moment; at the first real touch it stops and the pill answers only to hands: pointerdown with setPointerCapture, pointerup and pointercancel let go, Space and Enter held do the same from the keyboard.
| Name | File | Default | What it changes |
|---|---|---|---|
AMOUNT | script.js | €240 | The amount on the button, the one that flies. |
NAME | script.js | Mara | Who receives the money. |
HOLD_TIME | script.js | 1.4 | How many seconds you have to hold before it sends. |
SHAKE | script.js | 1 | How much the pill trembles while you hold it: 0 still, 2 strong. |
FLIGHT | script.js | 0.95 | How many seconds the coin flies to the avatar. |
FLIPS | script.js | 2.5 | How many times the coin turns during the flight. |
SPRING | script.js | 1 | How springy the moves are: 0.4 calm, 2 very bouncy. |
SHOW | script.js | 3 | How many seconds it stays on Sent with the receipt out before going back. |
AUTO | script.js | true | The drawn pointer goes round by itself until someone touches the button. |
For a banking or payments app, a digital wallet, an instant transfer, a payment between friends or settling a split bill: every action that moves real money and must not go off with a wrong tap. Holding is the confirmation, the ring says how much is left and the receipt that slides out says it is done.
On the phone the pill takes the full width minus the margins and long words end with an ellipsis; the finger holds just like the mouse (the long press menu is off), the coin flies a lower arc because the way is shorter and the receipt slides out the same.
Nothing moves: the ring still fills (it shows how much is left) without trembling, released early it empties without a spring, the amount fades, the tick and the new words fade in and the receipt appears already in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 4 November 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.