Skip to content
animorio
IT
All components

Live flight card

Cards, SVG, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The flight status card of an invented travel app, Skylet: a dark glass widget with the two cities of the trip, the route as a thin dashed arc with the drawn plane moving along it, the part already flown lighting up behind it and a soft light following it inside the glass. The time left, the arrival time, the altitude and the speed roll digit by digit, the status pill goes from On time to Descending to Landed changing colour, width and word on a spring, and a tap opens the card into the details: terminal, gate and baggage belt.

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>
<!--
  "Live flight 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>The live flight card with the route that moves on</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>
    <!-- the live flight widget of a travel app, Skylet: a dark glass card with the two ends of the trip, the route as a
         thin dashed arc with the plane moving along it, the travelled part lighting up behind it, the time left and the
         arrival time rolling, altitude and speed in small, and a status pill that goes On time, Descending, Landed.
         A tap opens the details: terminal, gate and the baggage belt. -->
    <div class="shell" data-shell>
      <article class="card" data-card aria-label="Flight Skylet 214 from Valmora to Elnhaven">
        <span class="card__glow" data-glow aria-hidden="true"></span>
        <span class="card__sheen" aria-hidden="true"></span>

        <header class="head">
          <div class="brand">
            <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
              <path d="M2.5 14.5C6 7 12 4.5 17.5 5.5"/>
              <path d="M13.6 3.2l3.9 2.3-2.4 3.8"/>
            </svg>
            <span class="brand__flight">Skylet 214</span>
            <span class="brand__date">Sat 7 Nov</span>
          </div>
          <span class="pill" data-pill aria-live="polite">
            <span class="pill__shine" data-pill-shine aria-hidden="true"></span>
            <span class="pill__words" data-pill-words>On time</span>
          </span>
        </header>

        <div class="ends">
          <div class="end end--from" data-from>
            <span class="end__code">VALM</span>
            <span class="end__city">Valmora</span>
            <span class="end__time"><span class="end__label">Left</span> 14:05</span>
          </div>
          <div class="end end--to" data-to>
            <span class="end__code">ELNH</span>
            <span class="end__city">Elnhaven</span>
            <span class="end__time"><span class="end__label" data-eta-label>Arrives</span> <span class="roll" data-eta></span></span>
          </div>
        </div>

        <div class="route" data-route aria-hidden="true">
          <svg class="route__svg" data-svg>
            <defs>
              <linearGradient id="litGrad" data-grad gradientUnits="userSpaceOnUse">
                <stop offset="0" class="lit-stop-a"/>
                <stop offset="0.7" class="lit-stop-b"/>
                <stop offset="1" class="lit-stop-c"/>
              </linearGradient>
              <filter id="litBlur" x="-20%" y="-200%" width="140%" height="500%">
                <feGaussianBlur stdDeviation="2.6"/>
              </filter>
            </defs>
            <path class="route__base" data-base/>
            <path class="route__glow" data-lit-glow/>
            <path class="route__lit" data-lit/>
            <path class="route__tick" data-tick-a/>
            <path class="route__tick route__tick--to" data-tick-b/>
            <g data-shadow-pos><g data-shadow-rot><path class="plane plane--shadow" data-plane-shadow/></g></g>
            <g data-plane-pos><g data-plane-rot><path class="plane" data-plane/></g></g>
          </svg>
        </div>

        <div class="facts">
          <p class="fact fact--left">
            <span class="fact__label" data-left-label>Time left</span>
            <span class="fact__value fact__value--big roll" data-left></span>
          </p>
          <p class="fact">
            <span class="fact__label">Altitude</span>
            <span class="fact__value"><span class="roll" data-alt></span> <span class="fact__unit">ft</span></span>
          </p>
          <p class="fact">
            <span class="fact__label">Speed</span>
            <span class="fact__value"><span class="roll" data-speed></span> <span class="fact__unit">km/h</span></span>
          </p>
        </div>

        <div class="more" data-more id="flight-details">
          <div class="more__inner">
            <div class="cells">
              <p class="cell" data-cell><span class="cell__label">Terminal</span><span class="cell__value">2</span></p>
              <p class="cell" data-cell><span class="cell__label">Gate</span><span class="cell__value">B12</span></p>
              <p class="cell cell--belt" data-cell>
                <span class="cell__label">Baggage belt</span>
                <span class="cell__value">
                  <svg class="cell__icon" viewBox="0 0 16 16" aria-hidden="true">
                    <rect x="3.5" y="4.5" width="9" height="8" rx="1.6"/>
                    <path d="M6 4.5V3.2c0-.5.4-.9.9-.9h2.2c.5 0 .9.4.9.9v1.3M3 14h10"/>
                  </svg>7
                </span>
              </p>
            </div>
            <div class="bags" data-cell>
              <span class="bags__words">First bags on the belt</span>
              <span class="bags__track"><span class="bags__fill" data-bags></span></span>
              <span class="bags__eta" data-bags-eta>in 6 min</span>
            </div>
          </div>
        </div>

        <button class="toggle" type="button" data-toggle aria-expanded="false" aria-controls="flight-details">
          <span class="toggle__face">
            <span class="toggle__words" data-toggle-words>Gate and baggage</span>
            <svg class="toggle__chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.5L8 10l3.5-3.5"/></svg>
          </span>
        </button>
      </article>
    </div>
  </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.

45 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 “Live flight card” 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 a black page a dark glass card with round corners rises. At the top the flight ‘Skylet 214’ and the date, on the right the green ‘On time’ pill; below, big, the two cities of the trip, ‘VALM Valmora’ on the left with the departure time and ‘ELNH Elnhaven’ on the right with the arrival time. In the middle the route: a thin arc of slowly flowing dashes, with a small white plane seen from above moving along it at an even speed, turned along the curve and swaying lightly; behind it the part already flown lights up in a blue trail that fades towards the departure, its shadow drifts a few pixels away while it is high and meets it on landing, and inside the glass a soft light follows it. Below, the time left, the altitude and the speed roll digit by digit. Three quarters along the route the pill turns amber, ‘Descending’, widening on a spring with a gleam running across it, the arrival time rolls four minutes earlier and the altitude starts to fall. When the plane reaches the end of the arc the pill turns light blue, ‘Landed’, the arrival code lights up, the speed drops to 18 km/h and in place of the time left comes ‘Taxiing to Gate B12’. Then the card opens on its own: Terminal, Gate and Baggage belt spring in, and a thin bar says when the first bags arrive. Tapping the card opens and closes it by hand.

How it works

An arc measured in pixels

The route is a quadratic curve drawn in the real size of its box (the viewBox is its width and height in pixels, recalculated on resize), so the dashes and the stroke do not stretch. A table of 200 lengths turns progress into a position on the curve: the plane moves at an even speed even where the arc is steeper.

The flown part, exact

The lit trail is the first half of the curve split with de Casteljau at the plane's point: another quadratic with the same start, redrawn every frame. Its gradient is in page coordinates, from the departure to the plane: transparent at the start, blue, white at the tip. A blurred copy with an SVG filter gives it its haze.

The plane, the shadow and the light

The plane takes its angle from the curve's derivative, plus a sway of a degree and a half; its shadow moves away in proportion to the altitude and meets it on landing. A radial light inside the glass follows its point, converted from the arc's coordinates to the card's.

The rolling digits

Each number is a row of slots aligned on the right: only the digit that differs changes, coming in from below with a back.out and a blur of a pixel and a half while the old one leaves at the top; the slot changes width if the letter is wider. The digits update at most every 0.5 s, so every change can be read.

The pill and the details

On a change of status the pill tweens the CSS variable of its colour, goes from the old width to the new one with an elastic and the new word rises while a gleam crosses it. The details open by measuring the real height (height auto) and animating it with a back.out, with the three tiles staggered.

Values to change

NameFileDefaultWhat it changes
STARTscript.js0.34Where the plane is along the route when the loop starts: 0 at the departure, 0.9 near the arrival.
DESCENT_ATscript.js0.74The point of the route where the descent begins.
FLIGHT_MINscript.js215Minutes of the whole flight.
EARLY_MINscript.js4How many minutes earlier the arrival time becomes once the descent begins.
CRUISE_FTscript.js36000The cruising altitude, in feet.
CRUISE_KMHscript.js842The cruising speed, in km/h.
ARCscript.js1How tall the route's arc is: 0.4 almost flat, 1.6 very tall.
SPEEDscript.js12 = the loop twice as fast, 0.5 = half.
SPRINGscript.js1How springy the digits, the pill and the press are: 0.4 calm, 2 very bouncy.
LOOPscript.jstrueRepeats the flight.

Try them in the Playground

When to use it

For a travel or airline app, a booking page, the flight widget in a travel dashboard, the screen of someone waiting for a person at arrivals, a flight tracking app: it shows where the plane is, how long is left and what to do on arrival, at a glance.

On phones

The same animation with adapted sizes: the card takes almost the whole width, the city codes, the arc and the margins shrink with the screen's height, and even open with the details it fits in the box. A finger tap opens and closes it, with the same spring press.

With reduced motion

The plane does not glide: it fades out and back in at the point of the route for each status (cruising, descending, landed), the digits and the pill change with a fade, the dashes stay still and the details open without a spring.

Pitfalls

  • Once landed, under the ‘Time left’ label came ‘At the gate’, which reads oddly: now the label changes too, with a fade, into ‘Taxiing to’, with ‘Gate B12’.
  • Rolling every 0.28 s, the digits of the time left were always mid-roll and looked blurred: they update at most every 0.5 s, so every change can be read.
  • The ticks at the two ends, placed under the arc, looked like an ‘i’ with the route's first dash above them: now they cross the end point.
  • With reduced motion the plane and the trail stayed invisible: drawing skipped the frames where the position did not change, even when the fade did. Now it redraws when only the opacity changes too.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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