Skip to content
animorio
IT
All components

Visa checker

Pickers, HoverGSAP, CSS onlyEasyCompressed weight: Demo 5.6 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On white, a rounded card: “Do I need a visa?” and on the right “Sample data”. Two rows: “Passport” with Italy, Brazil and India, and “Going to” with Japan, USA and Kenya; in each a white pill sits behind the choice. Below, the outcome panel, on a faintly green ground: an icon with a tick on a green square, “No visa needed”, “Just your passport, valid 6 months”, and three columns, “Stay 90 days”, “Cost Free”, “Ready in No wait”. Tapping “USA” springs the pill there and the outcome changes: ground, edge, shadow and square turn amber, the icon becomes a sheet and lands with a slight turn like a stamp, the verdict rolls into “Travel permit online” and the three lines into “90 days”, “$21”, “3 days”. With “Brazil” it turns red, the icon is the embassy building and it reads “Embassy visa”, “$185”, “6 weeks”. If the outcome stays the same kind, only the lines change, with no stamp.

How it works

A table of rules

Every 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 tone in one attribute

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 stamp only when needed

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.

Lines roll the right way

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.

Values to change

NameFileDefaultWhat it changes
FREEscript.js#128a5eThe colour of “no visa”.
ONLINEscript.js#d48806The colour of the online visa.
EMBASSYscript.js#d9432fThe colour of the embassy visa.
SPRINGscript.js1How much the icon and the pills bounce.
HOLDscript.js2.2How many seconds the demo’s pointer stays on each choice.
LOOPscript.jstrueLeft alone, the demo’s pointer changes passport and destination.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • The two rows are real radio groups (radiogroup) with their labels: they change with the arrow keys, and the outcome panel is a status region, so the new verdict is read out.
  • The outcome is not told by colour alone: the icon, the verdict and the three lines all change.
  • The rules are samples and the card says so (“Sample data”): real requirements change often and must come from an up-to-date official source, never typed by hand into a page.
  • The pills are measured on the choices in pixels: they are re-measured on resize and once the fonts have finished loading.

Libraries

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.

Testing

Tested on 29 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components