
The liquid grid
Hover, Transitions
The swap card of a crypto app: what you pay, what you receive, the rate and the Swap button. Type an amount and the other counts to its value. The disc in the middle turns and the two tokens trade places on arcs while the amounts cross and the rate rolls over. Swap lets a light run through it, becomes “Swapped” with a tick and the balances count to their new values.
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>
<!--
"Crypto swap 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>Crypto swap card</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">
<!-- the swap card of a crypto app: type an amount and the other side counts to its value, the round
button turns and the two tokens trade places on arcs, the rate rolls over, Swap confirms -->
<section class="sw" data-sw aria-label="Swap tokens">
<header class="sw__head">
<h2>Swap</h2>
<span class="sw__chip">Slippage 0.5%</span>
</header>
<div class="sw__panels">
<div class="sw__panel" data-panel="pay">
<div class="sw__top"><label for="sw-pay">You pay</label><span>Balance <b data-bal="pay"></b></span></div>
<div class="sw__row">
<input class="sw__amount" id="sw-pay" data-pay type="text" inputmode="decimal" autocomplete="off" spellcheck="false" maxlength="9">
<span class="sw__token" data-token="pay"><i></i><b></b></span>
</div>
</div>
<button class="sw__flip" type="button" data-flip aria-label="Switch the two tokens">
<svg viewBox="0 0 18 18" aria-hidden="true"><path d="M6 3.500v11M6 14.500l-3-3M6 14.500l3-3M12 14.500v-11M12 3.500l-3 3M12 3.500l3 3"></path></svg>
</button>
<div class="sw__panel" data-panel="get">
<div class="sw__top"><span>You receive</span><span>Balance <b data-bal="get"></b></span></div>
<div class="sw__row">
<output class="sw__amount" data-get for="sw-pay"></output>
<span class="sw__token" data-token="get"><i></i><b></b></span>
</div>
</div>
</div>
<p class="sw__rate"><span class="sw__ratein"><span data-rate></span></span><span class="sw__fee">Fee $1.20</span></p>
<button class="sw__go" type="button" data-go>
<span class="sw__gofill" data-gofill aria-hidden="true"></span>
<span class="sw__golabel"><svg viewBox="0 0 16 16" aria-hidden="true"><path data-gotick pathLength="1" d="M3.500 8.500l3 3 6-6.500"></path></svg><span data-golabel>Swap</span></span>
</button>
<span class="sw__say" data-say aria-live="polite"></span>
</section>
<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>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.
18 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Crypto swap card” from Animorio and fit it into my siteAt every key the amount received is worked out and a tween takes a number there, rewriting the text at each step with thousands separators.
First the data swap and the two pills are rewritten; then each starts from the other’s position (the distance is measured) and goes back to zero, with an x that goes out and back at half time to make the arc.
The disc’s angle grows by 180 degrees at every switch and never goes back: the pivot is the button’s centre.
A band with scaleX from 0 to 1 crosses the button; at the end the tick draws, its width goes from 0 to 16 pixels and the two balances count on the same tween.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #b6f24a | The colour of the Swap button, the text cursor and the active field’s edge. |
PRICE | script.js | 3224.8 | How many USDC one ETH is worth: the amount received and the rate line come from here. |
FLIP_TIME | script.js | 0.7 | How many seconds the two tokens take to trade places. |
SPRING | script.js | 1 | How much the disc bounces as it turns: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer types an amount, switches the tokens and confirms. |
On the swap screen of a wallet or an exchange, in a converter between two currencies or two units, wherever two linked fields can be switched round.
It is made for the phone: the card is 316 pixels wide at most, the field opens the number keyboard (inputmode decimal) and the switch disc is 38 pixels wide with an edge that sets it apart.
Amounts, tokens, balances and rate change at once, with no counting, arcs or half turn; Swap says “Swapping” then “Swapped” without the light. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.8 KB; the libraries: GSAP 28 KB.
Tested on 22 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.
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.