
The elastic button
Buttons, Hover, Text
A crypto app’s Connect wallet button, on black: pressed, it waits for the signature with a turning ring, then the lime pill goes dark and the address decodes itself character by character. Connected, it shows the identicon born from that address, the balance counting up and a way to disconnect.
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 wallet 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>Connect wallet button</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">
<!-- a Connect wallet button: it waits for the signature, the address decodes itself character by character,
and the pill settles dark with the identicon drawn from that address, the balance and a way out -->
<div class="cw" data-cw role="group" aria-label="Wallet">
<button class="cw__main" type="button" data-main>
<span class="cw__slot" aria-hidden="true">
<svg class="cw__wallet" data-wallet viewBox="0 0 24 24"><path d="M4 8.500A2.500 2.500 0 0 1 6.500 6H17v3M4 8.500v8A2.500 2.500 0 0 0 6.500 19H18a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2H6.500A2.500 2.500 0 0 1 4 8.500ZM15.300 14h1.400"></path></svg>
<svg class="cw__spin" data-spin viewBox="0 0 24 24"><circle cx="12" cy="12" r="8.500"></circle></svg>
<svg class="cw__face" data-face viewBox="0 0 5 5" shape-rendering="crispEdges"></svg>
</span>
<span class="cw__text">
<span class="cw__roll cw__label"><span data-label>Connect wallet</span></span>
<span class="cw__addr" data-addr></span>
<span class="cw__roll cw__sub"><span data-sub></span></span>
</span>
</button>
<button class="cw__off" type="button" data-off aria-label="Disconnect wallet" tabindex="-1">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4.500v7M7.400 7.200a6.800 6.800 0 1 0 9.200 0"></path></svg>
</button>
<span class="cw__say" data-say aria-live="polite"></span>
</div>
<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.
13 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 “Connect wallet button” from Animorio and fit it into my siteA small hash of the address seeds a number generator: fifteen flips decide a five-by-five grid mirrored down the middle, like wallet identicons, and the first number gives the hue of the squares and of the glow.
One tween from 0 to 1: its integer part says how many characters have settled, the rest take a random hex digit about twenty-eight times a second. The text is rewritten only when one of the two counts changes.
The pill has a width per state and reaches it on an elastic spring; the colours are CSS variables (--fill, --text, --glow) tweened by GSAP, so ground, label, edge and glow change together.
The whole svg turns with transformOrigin at 50% 50%; the identicon’s squares each scale from their own centre, ordered by distance from the middle of the grid.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #c9f43c | The button’s colour before connecting. |
ADDRESS | script.js | 0x71C4a8E2b90D35f6A1c7e04B8d2F5a639E0b9A3f | The wallet address: the identicon and its colour are born from it. |
BALANCE | script.js | 1.284 | The balance shown under the address. |
COIN | script.js | ETH | The coin’s ticker beside the balance. |
SIGN | script.js | 1.5 | How many seconds it waits for the signature in the wallet. |
DECODE | script.js | 0.9 | How many seconds the address takes to decode, character by character. |
LOOP | script.js | true | Left alone, the demo’s pointer connects the wallet, copies the address and disconnects. |
In the header of an app used with a wallet: a decentralised exchange, a marketplace of digital items, a staking dashboard. With other words, for any sign-in that goes through another app: “Sign in with passkey”, a code on the phone, a company login.
The same button by finger, 60 pixels tall: the connected pill is never wider than the screen and the disconnect key is a 40-pixel round. The light that follows the pointer exists only where there is a pointer.
No springs and no turning: the ring stays still, the address appears already written, the identicon and the balance appear in place and the colours switch at once.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.0 KB; the libraries: GSAP 28 KB.
Tested on 20 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.