
The elastic button
Buttons, Hover, Text
The «Connect bank» button of a finance app, on white, in the style of real product interface pieces: pressed, a row of three banks rises out of the button; once one is chosen its logo flies into the empty slot, a sagging wire draws itself between the app icon and the bank with a spark running along it, three accounts sync one after another and, once linked, the wire pulls tight, the balance rolls digit by digit and the button turns green with a check.
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>
<!--
"Connect bank 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 Connect bank button with the wire that draws itself</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 accounts card of a finance app: pressed, the button opens a row of three banks, the chosen logo flies into
the empty slot, a wire draws itself between the app and the bank, three accounts sync in and the balance rolls -->
<section class="bk" data-card aria-label="Tallymint accounts">
<header class="bk__head">
<svg class="bk__mark" viewBox="0 0 24 24" aria-hidden="true"><path d="M6 8.2h12M12 8.2V18"></path><path d="M8.4 4.8h7.2"></path></svg>
<p class="bk__brand">Tallymint <span>/ Accounts</span></p>
<p class="bk__state" data-state>Not linked</p>
</header>
<p class="bk__lead">Link a bank to see every balance in one place.</p>
<div class="link" data-link>
<div class="node">
<span class="node__box node__box--app" data-app>
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 8.2h12M12 8.2V18"></path><path d="M8.4 4.8h7.2"></path></svg>
</span>
<span class="node__name">Tallymint</span>
</div>
<svg class="wire" data-wire aria-hidden="true">
<path class="wire__base" data-w-base></path>
<path class="wire__live" data-w-live></path>
<path class="wire__spark" data-w-spark></path>
</svg>
<div class="node">
<span class="node__box node__box--slot" data-slot>
<svg class="slot__plus" data-plus viewBox="0 0 24 24" aria-hidden="true"><path d="M12 7.5v9M7.5 12h9"></path></svg>
</span>
<span class="node__name" data-bank-name>Your bank</span>
</div>
</div>
<div class="bal">
<p class="bal__label">Total balance</p>
<p class="bal__num" data-bal aria-live="polite"></p>
</div>
<ul class="acc" data-acc>
<li data-row><span>Everyday checking</span><span data-amt="3204.18">$3,204.18</span></li>
<li data-row><span>High-yield savings</span><span data-amt="18940.00">$18,940.00</span></li>
<li data-row><span>Travel card</span><span data-amt="2672.22">$2,672.22</span></li>
</ul>
<footer class="bk__foot">
<div class="pick" data-pick role="group" aria-label="Choose your bank">
<button class="chip" type="button" data-bank="Northvale">
<svg class="logo logo--a" viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" r="7.5"></circle><path class="logo__fill" d="M12 4.5a7.5 7.5 0 0 1 0 15Z"></path></svg>
<span>Northvale</span>
</button>
<button class="chip" type="button" data-bank="Cedarline">
<svg class="logo logo--b" viewBox="0 0 24 24" aria-hidden="true"><path class="logo__fill" d="M12 4 18 11H6Z"></path><path class="logo__fill" d="M12 9.5 19 18H5Z"></path></svg>
<span>Cedarline</span>
</button>
<button class="chip" type="button" data-bank="Brookfold">
<svg class="logo logo--c" viewBox="0 0 24 24" aria-hidden="true"><path class="logo__fill" d="M5 19V11a7 7 0 0 1 14 0v8h-4v-8a3 3 0 0 0-6 0v8Z"></path></svg>
<span>Brookfold</span>
</button>
</div>
<button class="cb" type="button" data-btn>
<span class="cb__icon" aria-hidden="true">
<svg class="cb__link" data-ico-link viewBox="0 0 24 24"><path d="M10.2 13.8a3.6 3.6 0 0 0 5.1 0l2.9-2.9a3.6 3.6 0 0 0-5.1-5.1l-1.2 1.2"></path><path d="M13.8 10.2a3.6 3.6 0 0 0-5.1 0l-2.9 2.9a3.6 3.6 0 0 0 5.1 5.1l1.2-1.2"></path></svg>
<svg class="cb__ring" data-ico-ring viewBox="0 0 24 24"><circle class="ring__bg" cx="12" cy="12" r="7.6"></circle><circle class="ring__fg" cx="12" cy="12" r="7.6"></circle></svg>
<svg class="cb__check" data-ico-check viewBox="0 0 24 24"><path data-check-path d="M6 12.4 10.2 16.4 18.2 8"></path></svg>
</span>
<span class="cb__label" data-label>Connect bank</span>
</button>
</footer>
</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>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.
33 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 “Connect bank button” from Animorio and fit it into my siteThe wire is a quadratic curve between the two boxes, with the control point pushed down by twice SAG. An object with sag and draw is animated by GSAP, and on every update it redraws the path, measures its length again and sets the dash: draw from 0 to 1 draws it, sag from SAG to 0 with elastic.out pulls it tight.
Over the wire sits the same path with a 12-pixel dash and a gap as long as the wire: moving the stroke-dashoffset from 12 to minus the length runs the dash from one end to the other, looping, until the link is made.
On click the logo in the row and the empty box are measured, an absolute copy is placed in the card and taken to its destination with two separate tweens: horizontally with power3.inOut and vertically with back.in, so the flight makes a small arc; a full turn goes with it. Once there, the real logo goes into the box and the copy disappears.
The balance is written with a 0 to 9 column for each digit, inside a box one line tall and 0.6 em wide: the column slides by yPercent to its digit. The columns start from the right, each a little later and a little slower than the one before, while the separators stay still.
The account rows start with zero height and GSAP takes them to auto one after another; the amount is an object counted from 0 to the value and written with toLocaleString on every update.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #0f9d6b | The colour of the wire, the check and the linked button. |
BALANCE | script.js | 24816.40 | The total balance that rolls once the accounts are synced. |
ACCOUNTS | script.js | 3 | How many accounts sync, from 1 to 3. |
WIRE_TIME | script.js | 1.1 | The seconds in which the wire draws itself from the app to the bank. |
SAG | script.js | 9 | How much the wire sags while linking, in pixels: at the end it pulls tight. |
PAUSE | script.js | 2.2 | The seconds the autopilot waits between one gesture and the next. |
For the onboarding of a personal finance or accounting app, the accounts page of an online bank, a budgeting or investing service, any connection to an outside service (a calendar, a storage account, a payment account).
The card takes the full width minus the margins and the spacing tightens with vmin; below 470 pixels of height the invitation line hides, so the card fits the box even with the accounts open. The row of banks narrows with the screen and the button is 44 pixels tall, easy for a finger. A tap does what a click does.
No flights, springs or rolling digits: the row of banks fades, the logo appears in the box, the wire is already tight, the accounts and the balance appear already written and the button turns green with the check; the drawn pointer stays hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.3 KB; the libraries: GSAP 28 KB.
Tested on 28 October 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.