Skip to content
animorio
IT
All components

Connect bank button

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

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.

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>
<!--
  "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>

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.

33 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 “Connect bank 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 very light grey background sits the white accounts card of Tallymint, an invented finance app: the mark, the grey Not linked label, a line inviting you to link a bank, and below it two boxes, on the left the black app icon and on the right an empty dashed box with a plus, joined by a dotted line. Then the total balance, grey at $0.00, and at the bottom the black «Connect bank» pill with an icon of two rings. On hover the two rings part by a hair and close again on an elastic. Pressed, the button squashes, the icon turns a quarter and a row of three invented banks, Northvale, Cedarline and Brookfold, each with its own geometric logo, rises out of the button, widening from below, the banks coming in one after another. Once a bank is chosen, the others drop away, the row closes and the chosen logo flies along an arc, spinning once, into the empty box, which takes it giving a little and becomes solid; the bank’s name appears below it. The button says «Connecting» with a spinning ring, so does the label at the top, and a green wire draws itself between the two boxes, sagging a little, while the app icon takes a step towards the bank. A spark runs along the wire, back and forth. Then «Syncing 3 accounts»: three accounts slide down one after another under the balance, each amount counting up from zero. At the end the spark goes out, the wire pulls tight on an elastic and thickens for a moment, the two boxes hop one after the other, the balance rolls digit by digit to $24,816.40, the button turns green, gives and settles, and a drawn check with «Connected · 3 accounts» and the Linked label close the gesture. Pressing again folds the accounts away, the wire withdraws and everything goes back to empty.

How it works

A wire that sags and then pulls tight

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

The running spark

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.

The logo flying into the box

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 rolling digits

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 accounts sliding in

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.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#0f9d6bThe colour of the wire, the check and the linked button.
BALANCEscript.js24816.40The total balance that rolls once the accounts are synced.
ACCOUNTSscript.js3How many accounts sync, from 1 to 3.
WIRE_TIMEscript.js1.1The seconds in which the wire draws itself from the app to the bank.
SAGscript.js9How much the wire sags while linking, in pixels: at the end it pulls tight.
PAUSEscript.js2.2The seconds the autopilot waits between one gesture and the next.

Try them in the Playground

When to use it

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

On phones

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.

With reduced motion

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.

Pitfalls

  • The wire must be redrawn on every tween update and on resize: its length changes with the curve, and a dash computed once would leave a gap or a tail.
  • The row of banks must not be centred with a CSS transform: GSAP animates it with y and scale and would wipe the translate. It is centred with margin auto and width max-content.
  • color-mix does not render in the preview video: the accent veils are computed in the script from the hex colour.

Libraries

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.

Testing

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