
The elastic button
Buttons, Hover, Text
The payout notifications of an app for people who sell online, in dark glass on black: the payout drops from the top as a pill, lands on a spring and widens into the notification; a spark runs along a thin rail from the shop to the bank, the amount rolls up from the previous payout, and on arrival the bank lights up, the title rolls to Payout arrived, a glint runs around the edge and the day’s total updates underneath. Newer payouts stack behind with depth and a +2 count; dragged up the notification goes, tapped it opens into the receipt.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React tab holds the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Payout notification" 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 payout notification that runs from the shop to the bank</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 payout notifications of Larkfold, an app for people who sell online. Each one drops from the top as a small
glass pill and widens into the notification: a spark runs along a thin rail from the shop to the bank, the
amount rolls up from the last payout, the edge catches a glint and the day's total updates underneath.
Newer payouts stack behind with a +N count; drag the front one up to clear it, tap it to open the receipt -->
<div class="dock" data-dock>
<span class="dock__glow" data-glow aria-hidden="true"></span>
<div class="dock__stack" data-stack aria-live="off"></div>
<span class="dock__count" data-count aria-hidden="true"><span data-count-text>+2</span></span>
</div>
<p class="sr" aria-live="polite" data-live></p>
</main>
<template data-tpl>
<div class="note" data-note role="group" aria-label="Payout">
<span class="note__dim" data-dim aria-hidden="true"></span>
<span class="note__sheen" data-sheen aria-hidden="true"></span>
<svg class="note__edge" aria-hidden="true">
<rect class="note__edge-spark" data-spark pathLength="1"/>
</svg>
<span class="note__mini" data-mini aria-hidden="true">
<span class="mini__icon">
<svg viewBox="0 0 20 20"><path d="M4 7.5h12M4 12.5h12" class="mini__bars"/><path d="M12.5 4.5L16 7.5l-3.5 3"/></svg>
</span>
<span class="mini__word">Payout</span>
<span class="mini__amount" data-mini-amount>€1,240</span>
</span>
<div class="note__body" data-body>
<button class="note__face" type="button" aria-expanded="false" data-face>
<span class="note__icon" aria-hidden="true">
<svg viewBox="0 0 24 24">
<rect class="icon__card" x="3.5" y="7" width="13" height="10" rx="2.4"/>
<path class="icon__chip" d="M6.5 11h3"/>
<path class="icon__arrow" data-arrow pathLength="1" d="M12.5 12.5L20 5M15 5h5v5"/>
</svg>
</span>
<span class="note__text">
<span class="note__title" data-title><span class="title__a" data-ta>Payout on the way</span><span class="title__b" data-tb aria-hidden="true"></span></span>
<span class="note__meta"><span data-meta>Larkfold</span> · now</span>
</span>
<span class="note__amount roll" data-amount></span>
</button>
<div class="note__track" aria-hidden="true">
<svg class="track__end track__shop" data-shop viewBox="0 0 16 16"><path d="M2.5 6.5L3.6 3h8.8l1.1 3.5M2.5 6.5c0 1 .8 1.7 1.8 1.7s1.8-.7 1.8-1.7c0 1 .8 1.7 1.9 1.7s1.9-.7 1.9-1.7c0 1 .8 1.7 1.8 1.7s1.8-.7 1.8-1.7M3.5 8.2V13h9V8.2M6.6 13v-2.7h2.8V13"/></svg>
<span class="track__rail" data-rail>
<span class="track__fill"></span>
<span class="track__spark"></span>
</span>
<svg class="track__end track__bank" data-bank viewBox="0 0 16 16"><path d="M2.5 5.6L8 2.6l5.5 3M3 6.2h10M4.4 6.8v5M7.1 6.8v5M8.9 6.8v5M11.6 6.8v5M2.6 13.2h10.8"/></svg>
</div>
<span class="note__route" aria-hidden="true"><span data-from>Marrow & Mint</span><span data-to>Calder Bank ending 4821</span></span>
<div class="note__balance">
<span class="balance__label">Paid out today</span>
<span class="balance__value roll" data-balance></span>
<svg class="balance__chev" data-chev viewBox="0 0 12 12" aria-hidden="true"><path d="M3 4.6L6 7.6l3-3"/></svg>
</div>
<div class="note__receipt" data-receipt>
<div class="receipt__in" data-receipt-in>
<span class="receipt__cut" aria-hidden="true"></span>
<dl class="receipt__rows">
<div class="receipt__row"><dt>From</dt><dd data-r-from>Marrow & Mint shop</dd></div>
<div class="receipt__row"><dt>To</dt><dd data-r-to>Calder Bank ending 4821</dd></div>
<div class="receipt__row"><dt>Orders</dt><dd data-r-orders>14 orders</dd></div>
<div class="receipt__row"><dt>Fees</dt><dd>€0.00</dd></div>
<div class="receipt__row"><dt>Arrived</dt><dd data-r-time>Today, 16:30</dd></div>
<div class="receipt__row"><dt>Reference</dt><dd class="receipt__ref" data-r-ref>PO-7Q4K-2210</dd></div>
</dl>
<div class="receipt__actions">
<button class="receipt__btn receipt__btn--main" type="button" data-view><span>View payout</span></button>
<button class="receipt__btn" type="button" data-dismiss><span>Clear</span></button>
</div>
</div>
</div>
</div>
</div>
</template>
<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.
19 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 “Payout notification” from Animorio and fit it into my siteEach notification is one element moved by GSAP, with overflow hidden and a 22 pixel radius: it starts 156 wide and 40 tall, drops with back.out, then its width and height go to the real size (the dock’s width and the measured height of the content) with back.out(1.25), which overshoots by a pixel and settles. The small pill fades while the content, already as wide as the finished notification, comes in rising 6 pixels.
Each digit is a strip of 21 cells (blank, 0 to 9, 0 to 9) inside a window one cell tall, with a soft mask at the top and bottom. The new figure is aligned right with the old one: a digit that matches stays still, otherwise the strip goes from the old digit to the same digit in the second set with yPercent, so it always turns upwards, passes the mark by seven hundredths of a cell and settles.
The rail has a CSS variable --p from 0 to 1 animated by GSAP: the green line is scaleX(var(--p)) and the spark sits at left calc(var(--p) * 100%), so it stays right even when the notification changes width. On arrival the glint on the edge is an SVG rect with pathLength 1, stroke-dasharray 0.09 0.91 and a stroke-dashoffset that does one lap.
The notifications live in an array, the front one first, with the transform origin at the bottom: the ones behind get a y equal to the front one’s height minus their own plus 9 pixels per slot, a 5% smaller scale and a black veil. Dragged up the notification follows the finger; down it goes through d times 0.4 over 1 plus d over 140, which resists more and more. Past 56 pixels or with a quick flick it flies off, otherwise it comes back with elastic.out.
Under the total sits a container 0 tall: tapping the notification measures its content and animates its height together with the notification’s, while the dashed line widens with scaleX and the rows come in staggered by 40 milliseconds. The ones behind tuck underneath and the count stays on the corner.
| Name | File | Default | What it changes |
|---|---|---|---|
TRANSFER_TIME | script.js | 1.3 | How many seconds the spark takes to run from the shop to the bank. |
ROLL_TIME | script.js | 1.1 | How many seconds the digits take to roll to the new amount. |
DISMISS_AT | script.js | 56 | How many pixels you drag the notification up for it to go. |
PEEK | script.js | 9 | How many pixels of each notification behind peek out underneath. |
ACCENT | script.js | #6ff0b0 | The colour of the money: the spark, the bank, the icon. |
SHOP | script.js | Marrow & Mint | The name of the shop the payouts come from. |
SPEED | script.js | 1 | The autopilot’s speed: 2 twice as fast, 0.5 half. |
LOOP | script.js | true | Plays the story again and again. |
In the apps and dashboards of online sellers, marketplaces, point of sale systems and payment services: when a payout, a takings transfer or a bank transfer lands in the account and you want to show where it comes from and where it goes, how much it is and how the day’s total changes, with the receipt one tap away.
The notification is at most 90% of the window wide and 118 pixels tall, 334 with the receipt open, so it fits whole in the frame; you drag it up with your finger and tap it to open the receipt.
No movement: the notification fades in at its full size, the digits change with a fade instead of rolling, the rail fills without a spark, no glint on the edge nor sheen; dragged up it fades and goes with a fade, and the receipt opens at once with its rows fading in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 7 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.