
The elastic button
Buttons, Hover, Text
A travel site’s visa checker on a white card: two rows of choices, passport and destination, each with a sliding pill, and the outcome below. Changing a choice changes the outcome’s tone, green for no visa, amber for an online visa, red for the embassy: the icon lands like a stamp, the verdict and the three lines (stay, cost, wait) roll.
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>
<!--
"Visa checker" 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>Visa checker</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 travel site's visa checker: the passport and the destination to choose, and the outcome
changing tone and lines, no visa, online visa or embassy visa -->
<section class="vc" data-vc data-tone="free" aria-label="Visa checker">
<header class="vc__head"><strong>Do I need a visa?</strong><span>Sample data</span></header>
<div class="vc__pick">
<span class="vc__lab" id="vc-from">Passport</span>
<div class="vc__opts" role="radiogroup" aria-labelledby="vc-from" data-group="from"><i class="vc__pill" data-pill aria-hidden="true"></i><button type="button" role="radio" aria-checked="true" data-v="it">Italy</button><button type="button" role="radio" aria-checked="false" data-v="br" tabindex="-1">Brazil</button><button type="button" role="radio" aria-checked="false" data-v="in" tabindex="-1">India</button></div>
</div>
<div class="vc__pick">
<span class="vc__lab" id="vc-to">Going to</span>
<div class="vc__opts" role="radiogroup" aria-labelledby="vc-to" data-group="to"><i class="vc__pill" data-pill aria-hidden="true"></i><button type="button" role="radio" aria-checked="true" data-v="jp">Japan</button><button type="button" role="radio" aria-checked="false" data-v="us" tabindex="-1">USA</button><button type="button" role="radio" aria-checked="false" data-v="ke" tabindex="-1">Kenya</button></div>
</div>
<div class="vc__out" data-out role="status">
<span class="vc__tile" data-tile aria-hidden="true"><svg viewBox="0 0 24 24"><path data-glyph="free" d="m5.500 12.600 4.200 4.200 8.800-10"></path><g data-glyph="online"><rect x="5.500" y="3.500" width="13" height="17" rx="2.200"></rect><path d="M9 8.500h6M9 12h6M9 15.500h3.500"></path></g><g data-glyph="embassy"><path d="M3.500 9.500 12 4.500l8.500 5M5 20h14M6.500 10.500v7M10.200 10.500v7M13.800 10.500v7M17.500 10.500v7"></path></g></svg></span>
<div class="vc__say"><strong class="vc__verdict"><span data-outverdict>No visa needed</span></strong><span class="vc__sub"><span data-outsub>Just your passport, valid 6 months</span></span></div>
<dl class="vc__facts"><div><dt>Stay</dt><dd><span data-outfact>90 days</span></dd></div><div><dt>Cost</dt><dd><span data-outfact>Free</span></dd></div><div><dt>Ready in</dt><dd><span data-outfact>No wait</span></dd></div></dl>
</div>
</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.
28 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 “Visa checker” from Animorio and fit it into my siteEvery passport and destination pair is one line: the kind of outcome, the verdict, the note and the three facts. Choosing means reading another line; on a real site the table comes from an up-to-date service.
The kind of outcome is an attribute on the card changing a single variable: the panel’s ground and edge, the icon square and the tinted shadow under the card all come from it.
The three icons live in the same svg. When the kind changes, the old one fades, the new one appears and the square lands with scale and rotation on a spring; if the kind is the same, no stamp.
The three kinds have an order, from the easiest to the hardest: if the outcome gets worse the texts roll up, if it gets better they roll down.
| Name | File | Default | What it changes |
|---|---|---|---|
FREE | script.js | #128a5e | The colour of “no visa”. |
ONLINE | script.js | #d48806 | The colour of the online visa. |
EMBASSY | script.js | #d9432f | The colour of the embassy visa. |
SPRING | script.js | 1 | How much the icon and the pills bounce. |
HOLD | script.js | 2.2 | How many seconds the demo’s pointer stays on each choice. |
LOOP | script.js | true | Left alone, the demo’s pointer changes passport and destination. |
On a destination page of a travel agency, an airline or a travel insurer, before booking; the same card with two choices and an outcome carries the compatibility of two products, shipping from one country to another, a plan’s coverage or the right plug for an adapter.
The card is at most 344 pixels wide and about 290 tall, and narrows with the screen: the three choices in each row share the room. Every choice is 30 pixels tall inside a 36-pixel row.
No springs and no stamp: the pill is on the choice at once, the icon cross-fades and verdict and lines change without rolling. Colours switch with no transition. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.6 KB; the libraries: GSAP 28 KB.
Tested on 29 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.