
The dash relief
WebGL, 3D, Hover
The cards screen of a made-up payments app, Halvik, in the style of today’s product components: four cards piled up in perspective like a tilted deck. On hover the stack opens up in 3D in steps with a short spring, each card with its own shadow on the floor; the pointer tilts the stack and a light runs over the card on top. On click the chosen card arcs out of the stack and lands in front, the others close back behind it, and below the name rolls and the balance counts up to its value.
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>
<!--
"3D payment cards" 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 card stack that opens up in 3D on hover</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 cards screen of a made-up payments app: four cards piled up in perspective like a tilted deck. On hover the
deck opens up in steps, the pointer tilts it and a light runs over the card on top; a click brings a card to the
front and the others close back behind it -->
<header class="head">
<p class="eyebrow"><svg class="mark" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 11.5 6.2 4.5 8 8.4l1.8-3.9 3.2 7"/></svg>Halvik</p>
<h1 class="title">Your cards</h1>
</header>
<div class="deck" data-deck>
<div class="tilt" data-tilt>
<button class="card" type="button" data-card data-name="Everyday" data-end="4821" data-balance="2480.20" style="--c1:#1a1a1d;--c2:#0b0b0c;--ink:#f4f4f5;--sub:rgba(244,244,245,.55)">
<span class="face">
<span class="row">
<span class="brand"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 11.5 6.2 4.5 8 8.4l1.8-3.9 3.2 7"/></svg>Halvik</span>
<svg class="wave" viewBox="0 0 20 20" aria-hidden="true"><path d="M7 5.5c1.6 1.2 2.4 2.7 2.4 4.5S8.6 13.3 7 14.5M10.4 3.5c2.2 1.7 3.3 3.9 3.3 6.5s-1.1 4.8-3.3 6.5M4 7.6c.8.6 1.2 1.4 1.2 2.4S4.8 11.8 4 12.4"/></svg>
</span>
<svg class="chip" viewBox="0 0 34 26" aria-hidden="true"><rect x="0.6" y="0.6" width="32.8" height="24.8" rx="5"/><path d="M0.6 9h10M0.6 17h10M23.4 9h10M23.4 17h10M11 0.6v24.8M23 0.6v24.8M11 13h12"/></svg>
<span class="row foot"><span class="kind">Everyday</span><span class="end">4821</span></span>
</span>
<span class="sheen" data-sheen></span>
<span class="edge"></span>
</button>
<button class="card" type="button" data-card data-name="Travel" data-end="0937" data-balance="864.75" style="--c1:#6d63f2;--c2:#3f37b8;--ink:#ffffff;--sub:rgba(255,255,255,.62)">
<span class="face">
<span class="row">
<span class="brand"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 11.5 6.2 4.5 8 8.4l1.8-3.9 3.2 7"/></svg>Halvik</span>
<svg class="wave" viewBox="0 0 20 20" aria-hidden="true"><path d="M7 5.5c1.6 1.2 2.4 2.7 2.4 4.5S8.6 13.3 7 14.5M10.4 3.5c2.2 1.7 3.3 3.9 3.3 6.5s-1.1 4.8-3.3 6.5M4 7.6c.8.6 1.2 1.4 1.2 2.4S4.8 11.8 4 12.4"/></svg>
</span>
<svg class="chip" viewBox="0 0 34 26" aria-hidden="true"><rect x="0.6" y="0.6" width="32.8" height="24.8" rx="5"/><path d="M0.6 9h10M0.6 17h10M23.4 9h10M23.4 17h10M11 0.6v24.8M23 0.6v24.8M11 13h12"/></svg>
<span class="row foot"><span class="kind">Travel</span><span class="end">0937</span></span>
</span>
<span class="sheen" data-sheen></span>
<span class="edge"></span>
</button>
<button class="card" type="button" data-card data-name="Business" data-end="5560" data-balance="12904.00" style="--c1:#eef0f3;--c2:#d4d8de;--ink:#17181b;--sub:rgba(23,24,27,.5)">
<span class="face">
<span class="row">
<span class="brand"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 11.5 6.2 4.5 8 8.4l1.8-3.9 3.2 7"/></svg>Halvik</span>
<svg class="wave" viewBox="0 0 20 20" aria-hidden="true"><path d="M7 5.5c1.6 1.2 2.4 2.7 2.4 4.5S8.6 13.3 7 14.5M10.4 3.5c2.2 1.7 3.3 3.9 3.3 6.5s-1.1 4.8-3.3 6.5M4 7.6c.8.6 1.2 1.4 1.2 2.4S4.8 11.8 4 12.4"/></svg>
</span>
<svg class="chip" viewBox="0 0 34 26" aria-hidden="true"><rect x="0.6" y="0.6" width="32.8" height="24.8" rx="5"/><path d="M0.6 9h10M0.6 17h10M23.4 9h10M23.4 17h10M11 0.6v24.8M23 0.6v24.8M11 13h12"/></svg>
<span class="row foot"><span class="kind">Business</span><span class="end">5560</span></span>
</span>
<span class="sheen" data-sheen></span>
<span class="edge"></span>
</button>
<button class="card" type="button" data-card data-name="Savings" data-end="2214" data-balance="6315.48" style="--c1:#c9d5c4;--c2:#9fb39a;--ink:#16211a;--sub:rgba(22,33,26,.55)">
<span class="face">
<span class="row">
<span class="brand"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 11.5 6.2 4.5 8 8.4l1.8-3.9 3.2 7"/></svg>Halvik</span>
<svg class="wave" viewBox="0 0 20 20" aria-hidden="true"><path d="M7 5.5c1.6 1.2 2.4 2.7 2.4 4.5S8.6 13.3 7 14.5M10.4 3.5c2.2 1.7 3.3 3.9 3.3 6.5s-1.1 4.8-3.3 6.5M4 7.6c.8.6 1.2 1.4 1.2 2.4S4.8 11.8 4 12.4"/></svg>
</span>
<svg class="chip" viewBox="0 0 34 26" aria-hidden="true"><rect x="0.6" y="0.6" width="32.8" height="24.8" rx="5"/><path d="M0.6 9h10M0.6 17h10M23.4 9h10M23.4 17h10M11 0.6v24.8M23 0.6v24.8M11 13h12"/></svg>
<span class="row foot"><span class="kind">Savings</span><span class="end">2214</span></span>
</span>
<span class="sheen" data-sheen></span>
<span class="edge"></span>
</button>
</div>
</div>
<div class="caption" aria-live="polite">
<p class="cname"><span class="roll" data-roll><span data-name-now>Everyday</span></span></p>
<p class="balance"><span class="cur">€</span><span data-balance-now>2,480.20</span></p>
<p class="hint" data-hint>Ending 4821 · Hover to open the stack</p>
</div>
<svg class="ghost" data-ghost viewBox="0 0 22 22" aria-hidden="true"><path d="M5 3.2v14.3l3.6-3.4 2.3 5.2 2.4-1-2.3-5.1h5z"/></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.
47 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 “3D payment cards” from Animorio and fit it into my siteThe stack is a preserve-3d container inside a box with a perspective in pixels, computed by the script as four card widths. The container tilts with rotateX, rotateY and rotateZ, and each card rises with translateZ: real depth decides which card is in front, with no z-index.
Opening, tilt and each card’s place are springs written by hand in GSAP’s ticker (stiffness 260, damping 23): they follow the pointer without restarting on every move and go a pixel past before settling.
The chosen card first arcs out of the stack (up in its plane and higher in depth), and only 0.16 seconds later changes place: so it passes over the others when it is already out, and the depth order changes without being seen.
Each card has a blurred shadow just under the stack: it moves, widens and fades with the card’s height. The reflection is a soft-light band of light that moves with the tilt, and a tween runs it across the top card when the stack opens.
| Name | File | Default | What it changes |
|---|---|---|---|
OPEN_GAP | script.js | 40 | How many pixels of height separate one card from the next when the stack is open (on a 300 wide card). |
REST_GAP | script.js | 6 | The thickness of the closed stack: how many pixels between cards at rest. |
ANGLE_X | script.js | 56 | How far the stack is tipped back, in degrees. |
ANGLE_Z | script.js | -22 | How far the stack is turned in its plane, in degrees. |
TILT | script.js | 9 | How many degrees the pointer tilts the stack. |
STIFFNESS | script.js | 260 | The spring’s stiffness: higher is quicker. |
DAMPING | script.js | 23 | The spring’s damping: lower means more bounce. |
SHEEN | script.js | 0.6 | How visible the reflection on the cards is (0 = none). |
PERSPECTIVE | script.js | 4 | The perspective, in card widths: lower is stronger. |
For the cards screen of a payments or banking app, to pick a plan or an account, or to show a fintech’s products on a landing page: the stack says how many there are, hovering shows them all, a click picks one.
The same animation with the card sized on the box’s width and height. With a finger the first tap opens the stack and the second brings the tapped card forward; there is no pointer tilt.
The stack stays open and still, with no tilt, springs or arcs: the chosen card comes to the front in a fade and the name and balance change in a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.1 KB; the libraries: GSAP 28 KB.
Tested on 26 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.