
The send button
Buttons, Transitions, SVG
The button that confirms a payment in a premium wallet, Halden, on black: a graphite glass pill with the face recognition glyph in a round well, Confirm with Face ID and the amount. Tapped, the glyph redraws stroke by stroke and a band of mint light scans it while another crosses the pill. The first try does not recognise the face: the glyph turns coral, the mouth goes flat and the pill shakes sideways. On the second the four corners close on a spring and become one check, the mint spreads from the well and the words widen into Paid.
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>
<!--
"Face ID pay 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 Face ID pay button with the corners that become a check</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 pay button of a wallet app (Halden): a graphite glass pill with the face glyph in a round well, the words
and a small chip. Tapped, the glyph draws itself stroke by stroke, a band of light scans it, and either the face
is not recognised (a shake, try again) or the four corners close on a spring into a check and the pill widens
into Paid -->
<button class="pay" type="button" data-pay aria-describedby="pay-live">
<span class="pay__glass" aria-hidden="true"></span>
<span class="pay__tint" data-tint aria-hidden="true"></span>
<span class="pay__glow" aria-hidden="true"></span>
<span class="pay__sweep" aria-hidden="true"><i data-sweep></i></span>
<span class="fid" data-fid aria-hidden="true">
<span class="fid__ring" data-fid-ring></span>
<svg class="fid__svg" viewBox="0 0 44 44">
<defs>
<linearGradient id="fid-band" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" stop-color="#fff" stop-opacity="0"/>
<stop offset="0.5" stop-color="#fff" stop-opacity="1"/>
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
</linearGradient>
<mask id="fid-mask" maskUnits="userSpaceOnUse" x="0" y="0" width="44" height="44">
<rect data-band x="0" y="-16" width="44" height="16" fill="url(#fid-band)"/>
</mask>
</defs>
<g class="fid__base" data-glyph>
<g id="fid-copy">
<path class="fid__corner" data-corner pathLength="1" d=""/>
<path class="fid__corner" data-corner pathLength="1" d=""/>
<path class="fid__corner" data-corner pathLength="1" d=""/>
<path class="fid__corner" data-corner pathLength="1" d=""/>
<g class="fid__face" data-face>
<path data-part pathLength="1" d="M15.5 15.5v3.2"/>
<path data-part pathLength="1" d="M28.5 15.5v3.2"/>
<path data-part pathLength="1" d="M22.4 15.6v8.2c0 1.3-0.7 1.9-2 1.9h-0.6"/>
<path data-part data-mouth pathLength="1" d="M16.6 29.8Q22 33.8 27.4 29.8"/>
</g>
</g>
</g>
<g class="fid__lit" data-lit mask="url(#fid-mask)">
<use href="#fid-copy"/>
</g>
</svg>
<span class="fid__band" data-band-glow></span>
</span>
<span class="pay__words" data-words>
<span class="pay__layer" data-layer="rest">
<span class="pay__t">Confirm with Face ID</span>
<span class="pay__s">Pay $248.00 to Marlow Supply</span>
</span>
<span class="pay__layer" data-layer="scan">
<span class="pay__t">Scanning</span>
<span class="pay__s">Look at your screen</span>
</span>
<span class="pay__layer pay__layer--error" data-layer="error">
<span class="pay__t">Face not recognized</span>
<span class="pay__s">Tap to try again</span>
</span>
<span class="pay__layer" data-layer="retry">
<span class="pay__t">Try again</span>
<span class="pay__s">Pay $248.00 to Marlow Supply</span>
</span>
<span class="pay__layer pay__layer--paid" data-layer="paid">
<span class="pay__t">Paid $248.00</span>
<span class="pay__s">Marlow Supply · receipt sent</span>
</span>
</span>
<span class="chip" data-chip aria-hidden="true">
<svg class="chip__arrow" data-chip-arrow viewBox="0 0 16 16"><path d="M3.4 8h8.6M8.6 4.4L12.2 8 8.6 11.6"/></svg>
<svg class="chip__spin" data-chip-spin viewBox="0 0 16 16"><circle cx="8" cy="8" r="5.4" pathLength="1"/></svg>
<svg class="chip__receipt" data-chip-receipt viewBox="0 0 16 16"><path d="M4.4 2.6h7.2v10.8l-1.8-1.1-1.8 1.1-1.8-1.1-1.8 1.1zM6.4 6h3.2M6.4 8.6h3.2"/></svg>
</span>
</button>
<p class="sr" id="pay-live" 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.
27 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 “Face ID pay button” from Animorio and fit it into my siteEach corner is a path of five points: the start, the point before the bend, the bend's control (Q), the point after and the end. The check is written with five points too, the middle three all on its knee. So every corner can become the check: one value m (0 corners, 1 check) moved by GSAP, and every frame the points are interpolated and the d is rewritten. The two bottom corners go to the check reversed, so they do not cross, and each one starts a moment after the last.
The closing uses a hand written ease: the response of a damped spring normalised between 0 and 1. It passes one by a little, so the points go a pixel past the check and come back: the overshoot comes from physics, not from a keyframe. Before closing a second value pulls the corners towards the middle for a breath.
The glyph is there twice: once in its colour and once as a white copy made with use, masked by a rectangle with a transparent, white, transparent gradient. GSAP moves the rectangle's y attribute down and up: only the strokes under the band light up. Above it a mint CSS band does the same trip in screen, and a slanted glint crosses the pill.
Every stroke has pathLength 1, so stroke-dasharray 1 1 and stroke-dashoffset from 1 to 0 draw all of it, whatever shape it has at that moment; the attribute is animated, not the CSS property. First the corners, staggered, then the eyes, the nose and the mouth. The mouth is a Q curve whose control goes up and down: a smile, flat in the error.
The five lines of words sit on top of each other; their width is measured with scrollWidth and the box goes to it on the spring, with the pill following. Paid is measured already at font-stretch 112 percent: GSAP takes it from 94 to 112 on Mona Sans's wdth axis, together with the width.
| Name | File | Default | What it changes |
|---|---|---|---|
AMOUNT | script.js | '248.00' | The amount in dollars, in the button's words. |
SCAN | script.js | 1.5 | The seconds the scan lasts: the band goes down and back up in this time. |
FAIL_FIRST | script.js | true | The first try does not recognise the face and the second goes through; with false it pays at once. |
BOUNCE | script.js | 0.62 | The springs: lower bounces more (0.4), higher settles without passing the mark (1). |
SHAKE | script.js | 8 | The pixels of the sideways shake when the face is not recognised. |
HOLD | script.js | 2.6 | The seconds on Paid before going back to rest. |
LOOP | script.js | true | The pilot pays by itself, again and again, until someone touches the button. |
For the last step of a payment in a banking app, a wallet, an online shop checkout or the booking of a hotel or a ticket: the button that confirms with the face and tells at a glance whether it went through. It also works to unlock a password vault or a private area, by changing the words, and as a showcase of a fintech app on a landing page.
The same animation with adapted sizes: the pill stays 64 pixels tall and never goes past the width of the screen, the words get a little tighter under 360 pixels and, if there is not enough room, the width of the words stops before the edge; it is tapped with a finger and the press gives as with a mouse.
Nothing moves: no shake and no springs, the band of light fades in and out, the check takes the corners' place at once, the face fades away, the words and the colours change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.4 KB; the libraries: GSAP 28 KB.
Tested on 6 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.