Skip to content
animorio
IT
All components

Flight check-in button

Buttons, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.5 KBGSAP 28 KBFreeDownload the zip

The «Check in» button of a made-up airline in the style of product interface pieces, on white: pressed, a dashed runway appears inside the black pill and a small plane taxis from left to right, speeding up, while the pill fills with blue behind it; at the right edge it lifts its nose and takes off out of the pill, leaving its shadow on the runway. The pill widens into the seat you got, «Seat 14A · Boarding 08:40», with a small seat map whose seats light up one after another until only yours stays lit.

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>
<!--
  "Flight check-in 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>The Check in button with the plane taking off</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>
    <!-- a black pill: pressed, a small plane taxis along a runway inside it, the fill grows behind it,
         it lifts off the right edge; the pill lands as the seat you got, with a little seat map -->
    <div class="checkin" data-checkin>
      <p class="flight" data-flight>
        <span>Wrenair</span>
        <span class="flight__dot" aria-hidden="true"></span>
        <span>LIS</span>
        <svg class="flight__arrow" viewBox="0 0 16 10" aria-hidden="true"><path d="M1 5h13M10 1.5 13.6 5 10 8.5"></path></svg>
        <span>AMS</span>
        <span class="flight__dot" aria-hidden="true"></span>
        <span>WR 482</span>
      </p>

      <div class="wrap" data-wrap>
        <button class="pill" type="button" data-pill data-autoclic aria-live="polite">
          <span class="pill__ink" aria-hidden="true"></span>
          <span class="pill__fill" data-fill aria-hidden="true"></span>
          <span class="pill__runway" data-runway aria-hidden="true"></span>

          <span class="face face--idle" data-idle>
            <svg class="face__plane" data-mini viewBox="0 0 24 24" aria-hidden="true">
              <path d="M21 12.2c0-.9-.7-1.4-1.6-1.4h-4.6L10.4 4H8.6l2.3 6.8H6.6L5 8.6H3.6l1 3.6-1 3.6H5l1.6-2.2h4.3L8.6 20.4h1.8l4.4-6.8h4.6c.9 0 1.6-.5 1.6-1.4Z"></path>
            </svg>
            <span class="face__label">Check in</span>
          </span>

          <span class="face face--done" data-done aria-hidden="true">
            <svg class="seats" data-seats viewBox="0 0 34 22" aria-hidden="true"></svg>
            <span class="done__text"><b data-seat>Seat 14A</b><span class="done__sep" aria-hidden="true"></span><span data-board>Boarding 08:40</span></span>
          </span>
        </button>

        <svg class="plane" data-plane viewBox="0 0 24 24" aria-hidden="true">
          <path d="M21 12.2c0-.9-.7-1.4-1.6-1.4h-4.6L10.4 4H8.6l2.3 6.8H6.6L5 8.6H3.6l1 3.6-1 3.6H5l1.6-2.2h4.3L8.6 20.4h1.8l4.4-6.8h4.6c.9 0 1.6-.5 1.6-1.4Z"></path>
        </svg>
        <span class="shadow" data-shadow aria-hidden="true"></span>
      </div>

      <p class="note" data-note>
        <svg viewBox="0 0 24 24" aria-hidden="true"><path data-check d="m5.5 12.5 4.2 4.2 8.8-9.4"></path></svg>
        <span>Boarding pass sent to your inbox</span>
      </p>
    </div>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.

20 values to change

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 “Flight check-in button” 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 there is a thin line with the flight, «Wrenair · LIS → AMS · WR 482», and under it a black pill with a small plane seen from above and the words «Check in». On hover the pill grows a little, the plane moves two and a half pixels forward as if starting up, and the dashed runway shows faintly at the bottom of the pill; pressed, it squashes. On click the label rises and fades, the runway lights up and the plane appears on the left, with its soft shadow under it. It taxis to the right, starting slowly and speeding up, with a slight bump at each joint of the runway, while the dashes run backwards faster and faster and the pill fills with blue behind it, up to where it has got. At the right edge it lifts its nose, grows as if coming towards us and leaves the pill climbing to the upper right, while the shadow stays on the runway and shrinks until it disappears. The pill, all blue by now, widens on a spring and sinks one pixel; inside come a small map of six seats and «Seat 14A · Boarding 08:40». The seats light up one after another like a search, then only yours stays lit, swelling and settling; below, «Boarding pass sent to your inbox» appears with a check drawing itself. After a few seconds the blue leaves to the right, the way the plane went, and «Check in» comes back. A drawn pointer does it all by itself and stops at the first real touch.

How it works

The plane outside the pill

The pill hides its overflow for the fill and the runway, but the plane and its shadow sit beside it, in the same container: that way the plane can leave over the edge without being clipped. Their position is worked out from the pill’s rectangle at the moment of the click.

The blue that follows the plane

The fill is a layer with scaleX from zero and its origin on the left. It has no tween of its own while taxiing: on every update of the plane its x is read with gsap.getProperty and turned into the scale of the blue, so the colour always reaches exactly where the plane is.

Taxi and take-off

The taxi is a tween of x with power2.in (it starts slowly and speeds up) and a small yoyo of y of eight tenths of a pixel for the runway joints; the runway is a repeating gradient whose background-position runs backwards with the same curve. The take-off is a second tween: x past the edge, y up, a rotation of minus 16 degrees and scale 1.35, with opacity dropping in the last third; meanwhile the shadow stays down and shrinks.

The seat that lights up

The map is a small SVG with six seats (backrest and cushion). A timeline of calls lights one seat at a time in an order that looks like a search, then leaves lit only the one of the seat letter, which swells to 1.32 and comes back with elastic.out.

Coming back

After a few seconds a delayedCall takes away the line and the seat, the pill goes back to the width of «Check in» and the blue leaves with its origin moved to the right, the way the flight went. The autopilot awaits the tweens as promises and stops at the first real touch.

Values to change

NameFileDefaultWhat it changes
TAXIscript.js1.5How many seconds the plane taxis along the pill before taking off.
LIFTscript.js0.75How many seconds the take-off lasts, from the edge of the pill to the sky.
HOLDscript.js2.8How many seconds the seat stays before «Check in» comes back.
SEATscript.js"14A"The seat you get: the row and the letter, from A to F.
BOARDINGscript.js"08:40"The boarding time.
SKYscript.js#2f6bffThe colour that fills the pill behind the plane.
INKscript.js#0b0b0cThe colour of the pill at rest.

Try them in the Playground

When to use it

For the online check-in button of an airline or a travel app: the wait for the check-in becomes a small take-off, and the button itself tells you your seat and boarding time.

On phones

The open pill never goes past the width of the box minus the margins; the plane leaves over the edge but stays inside the box, and a tap does what a click does.

With reduced motion

No plane and no runway: the label fades, the pill turns blue with a fade and changes width at once, the seat and the line below fade in with the check already drawn, and the drawn pointer is not shown.

Pitfalls

  • The plane cannot sit inside the pill: the hidden overflow, needed for the blue and the runway, would clip it at take-off. It sits beside it, placed with the pill’s numbers read at the moment of the click.
  • The blue has no tween of its own: tied to the plane’s x with onUpdate, it never runs ahead or lags behind even if you change the taxi time.
  • The width with the seat is measured after document.fonts.ready with the content at max-content: measured earlier, «Boarding 08:40» wrapped.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 6.5 KB; the libraries: GSAP 28 KB.

Testing

Tested on 30 October 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