Skip to content
animorio
IT
All components

Cardless withdrawal card

Cards, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.7 KBGSAP 28 KBFreeDownload the zip

The “Cardless cash” card of a bank app: pick the amount, ask for the code and six digits drop into their boxes one after the other, with the expiry bar shortening and the minutes running. When the ATM confirms, the card changes face: the tick draws itself in its circle and the balance at the top counts down.

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>
<!--
  "Cardless withdrawal card" 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>Cardless ATM withdrawal</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">
    <!-- cardless cash in a bank app: pick the amount, get a six-digit code for the ATM,
         watch it expire, and see the balance go down once the cash is out -->
    <i class="frame" data-frame aria-hidden="true"></i>
    <section class="cc" data-cc data-state="pick" aria-label="Cardless cash">
      <header class="cc__head">
        <span class="cc__icon" aria-hidden="true"><svg viewBox="0 0 20 20"><rect x="2.500" y="4.500" width="15" height="11" rx="2.200"></rect><circle cx="10" cy="10" r="2.300"></circle><path d="M5.200 7.400h.010M14.800 12.600h.010"></path></svg></span>
        <span class="cc__title">Cardless cash</span>
        <span class="cc__bal"><span class="cc__ballabel">Checking 4821</span><strong>$<span class="cc__roll"><b data-outbal>2,480.00</b></span></strong></span>
      </header>

      <div class="cc__body" data-body>
        <div class="cc__face" data-face="pick">
          <div class="cc__chips" role="radiogroup" aria-label="Amount">
            <i class="cc__thumb" data-thumb aria-hidden="true"></i>
            <button type="button" role="radio" aria-checked="false" data-amount="20">$20</button>
            <button type="button" role="radio" aria-checked="true" data-amount="60">$60</button>
            <button type="button" role="radio" aria-checked="false" data-amount="100">$100</button>
            <button type="button" role="radio" aria-checked="false" data-amount="200">$200</button>
          </div>
          <button class="cc__go" type="button" data-get><span>Get cash code</span></button>
        </div>

        <div class="cc__face" data-face="code">
          <p class="cc__hint">Enter this code at any Northway ATM</p>
          <div class="cc__code" data-code aria-hidden="true">
            <span><b></b></span><span><b></b></span><span><b></b></span><i></i><span><b></b></span><span><b></b></span><span><b></b></span>
          </div>
          <div class="cc__expiry"><span class="cc__track"><i data-bar></i></span><span class="cc__left">Expires in <b data-outleft>10:00</b></span></div>
          <button class="cc__cancel" type="button" data-cancel>Cancel code</button>
        </div>

        <div class="cc__face" data-face="done">
          <span class="cc__ok" aria-hidden="true"><svg viewBox="0 0 24 24"><path data-tick pathLength="1" d="m6.500 12.400 3.700 3.700 7.300-8.200"></path></svg></span>
          <p class="cc__done"><strong>$<span data-outtaken>60</span> withdrawn</strong><span>Northway ATM, just now</span></p>
          <button class="cc__go cc__go--soft" type="button" data-reset><span>Done</span></button>
        </div>
      </div>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.

30 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Cardless withdrawal card” 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 black, a dark card with a green glow in one corner: at the top the banknote icon, “Cardless cash” and on the right the account with its balance. Below, four amounts in a band ($20, $60, $100, $200): on tap the light tile slides under the chosen one on a spring. The green “Get cash code” button changes the card’s face, which takes its new height with a slight bounce: “Enter this code at any Northway ATM”, six boxes in two groups of three where the digits drop in from above one after the other, the green expiry bar shortening and “Expires in 9:59” counting the seconds, and “Cancel code” to call it off. When the ATM confirms (in the demo after a few seconds), the third face arrives: the tick draws itself in the green circle, “$100 withdrawn”, and the balance at the top counts down from 2,480 to 2,380 dollars. “Done” goes back to picking the amount. If time runs out, the code expires and the card returns to the choice by itself.

How it works

Three faces, one body

Choice, code and confirmation are three faces on top of each other inside the same body. On every step the body takes the height of the new face on a spring, the old one goes out and the pieces of the new one come in staggered.

One number for the expiry

A single number counts the seconds left: it shortens the bar and writes minutes and seconds. At zero the code expires and the card goes back to the choice.

The withdrawal

On confirmation the tick draws itself, the amount is taken off the balance and the figure at the top counts to its new value. In the demo the confirmation comes from a GSAP delay; in a real app the server sends it.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#3ddc97The colour of the button, the bar and the tick.
BALANCEscript.js2480The account balance at the start, in dollars.
EXPIRESscript.js600After how many seconds the code expires.
WITHDRAWscript.js4.2In the demo, how many seconds the ATM takes to confirm the withdrawal.
SPRINGscript.js1How much the card and the amount choice bounce.

Try them in the Playground

When to use it

In a bank or card app, on the withdrawals screen; in any flow where a timed code is used on another device: collecting from a locker, signing in on a TV, paying at the till.

On phones

The card is at most 308 pixels wide and at most about 265 tall (the code face), and narrows with the screen: the digit boxes shrink together. The amounts are 38 pixels tall, the buttons 50 and 46: everything is thumb-sized and nothing depends on hover.

With reduced motion

The amount tile moves at once, the card changes height with no bounce and the faces cross-fade; the digits are already in their boxes, the tick is already drawn and the balance changes without counting. The expiry bar keeps shortening, because it tells the time. The demo’s pointer does not start.

Pitfalls

  • The amounts are a real radio group: the arrow keys move the choice and the tile follows.
  • The code is read out in an aria-live region in groups of three digits; the boxes are only its visible shape.
  • The tick stays in the middle of its circle because what shrinks and comes back is the svg, not the circle: this way it never fights the staggered entrance of the pieces.
  • Code, balance and the ATM’s confirmation are invented and worked out in the script: in a real app they come from the server, and the code is never kept in the browser longer than needed.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.7 KB; the libraries: GSAP 28 KB.

Testing

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