
Speeding marquee
Scroll, Text, Hover
A text and hover animation for a banking app: the graphite virtual card with its number hidden behind thin bars. Passing over it a band of light crosses it and every digit develops exactly when the light touches it, wide and heavy on the variable font's axes, then settles to its width on a small elastic. The card leans toward the pointer and the pill underneath changes its words: Show details, Copy number, Copied.
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>
<!--
"Virtual card reveal" 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 virtual card with the number that reveals itself as you pass</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 virtual card of a banking app. The number is hidden behind thin bars; passing over the card a band of
light crosses it and every digit develops where the light touches it, wide and heavy for an instant, then it
settles to its normal width. The pill under the card changes its words: Show details, Copy number, Copied -->
<div class="wallet" data-wallet>
<div class="card" data-card>
<div class="card__body" data-body>
<span class="card__grain" aria-hidden="true"></span>
<span class="card__aura" data-aura aria-hidden="true"></span>
<span class="card__sheen" data-sheen aria-hidden="true"></span>
<header class="card__head">
<span class="card__brand">norrow</span>
<span class="card__kind">Virtual</span>
</header>
<div class="card__marks" aria-hidden="true">
<svg class="card__chip" viewBox="0 0 34 26">
<defs>
<linearGradient id="chip" x1="0" y1="0" x2="1" y2="1">
<stop offset="0" stop-color="#d9d4c7"/>
<stop offset=".5" stop-color="#9c978b"/>
<stop offset="1" stop-color="#cfc9ba"/>
</linearGradient>
</defs>
<rect x=".5" y=".5" width="33" height="25" rx="5" fill="url(#chip)"/>
<path d="M.5 9h10M.5 17h10M23.5 9h10M23.5 17h10M10.5 .5v25M23.5 .5v25M10.5 13h13" fill="none" stroke="rgba(40,38,34,.45)" stroke-width=".8"/>
</svg>
<svg class="card__wave" viewBox="0 0 18 20">
<path d="M4 6.5a5 5 0 0 1 0 7M8 4a8.5 8.5 0 0 1 0 12M12 1.5a12 12 0 0 1 0 17" fill="none" stroke="currentColor" stroke-width="1.4" stroke-linecap="round"/>
</svg>
</div>
<p class="card__number" data-number aria-hidden="true"></p>
<footer class="card__foot">
<span class="card__field">
<span class="card__label">Card holder</span>
<span class="card__value">Ava Lindqvist</span>
</span>
<span class="card__field">
<span class="card__label">Expires</span>
<span class="card__value">08/29</span>
</span>
<span class="card__field card__field--cvv">
<span class="card__label">CVV</span>
<span class="card__value card__digits" data-cvv></span>
</span>
</footer>
</div>
</div>
<div class="row">
<span class="row__name">
<span class="row__title">Groceries card</span>
<span class="row__note" data-note>Number hidden</span>
</span>
<button class="pill" type="button" data-pill>
<span class="pill__face" data-face>
<svg class="pill__icon" viewBox="0 0 16 16" aria-hidden="true">
<g class="pill__eye" data-eye>
<path d="M1.6 8s2.4-4.4 6.4-4.4S14.4 8 14.4 8 12 12.4 8 12.4 1.6 8 1.6 8z"/>
<circle cx="8" cy="8" r="2"/>
</g>
<g class="pill__copy" data-copy>
<rect x="5.2" y="5.2" width="8" height="8.6" rx="2"/>
<path d="M10.6 3.4V3.1a1.5 1.5 0 0 0-1.5-1.5H4a1.8 1.8 0 0 0-1.8 1.8v5.4a1.5 1.5 0 0 0 1.5 1.5h.3"/>
</g>
<path class="pill__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
</svg>
<span class="pill__words" data-words>Show details</span>
</span>
</button>
</div>
</div>
<p class="sr" aria-live="polite" data-live></p>
</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.
28 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 “Virtual card reveal” from Animorio and fit it into my siteThe script splits the number into cells 0.6 em wide, each holding the digit and, on top, the bar that hides it. The cell never changes width: so the digit can swell on the wdth axis without pushing the others.
On a pass the band of light crosses the card in 0.85 s from the side the pointer comes in. Each digit's delay is the position of its centre along that path, measured at that moment: the digit develops exactly when the light passes over it.
The bar shrinks to zero, the digit rises 5 px out of a blur at width 125 and weight 760 (two CSS variables inside font-variation-settings, tweened by GSAP), then goes back to 100 and 500 on an elastic.out(1, 0.5): it passes the mark slightly and settles.
The old label leaves squeezing to width 75, the new one comes in at 125 and settles; the pill measures the new label's width and gets there on a back.out. The three icons (eye, copy, check) swap with a small scale; the check draws itself with stroke-dashoffset.
A GSAP timeline moves a fake pointer that tilts the card, comes in from the left, reveals, goes down to the pill, copies and leaves on the right. At the first real mouse move or the first touch the timeline stops and whoever is watching takes over.
| Name | File | Default | What it changes |
|---|---|---|---|
NUMBER | script.js | '4921 0738 5562 4821' | The card number, in four groups: the last one always stays visible. |
CVV | script.js | '417' | The three digits on the back. |
SWELL | script.js | 125 | How wide a digit is while it develops (width axis, 75 to 125). |
WEIGHT | script.js | 760 | How heavy a digit is while it develops (200 to 900). |
SETTLE | script.js | 0.9 | How long a digit takes to settle, in seconds. |
SWEEP | script.js | 0.85 | How long the light takes to cross the card, in seconds. |
TILT | script.js | 5 | How far the card leans toward the pointer, in degrees. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the walk on its own. |
For the app or website of a bank, a fintech, a digital wallet or a virtual card service: the card screen where the details show only when they are needed, and for the landing page of a payment product.
The same animation with adapted sizes: the card is as wide as the box allows and the words are sized on its width; with a finger a tap on the card reveals or hides the number and the pill copies it.
No light crossing, no tilt and no swelling digits: the bars and the digits swap with a fade, and the pill's words change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.5 KB; the libraries: GSAP 28 KB.
Tested on 10 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.