Skip to content
animorio
IT
All components

Delayed flight notification

Notifications, Hover, TransitionsGSAP, CSS onlyAdvancedCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

The live notification of an airline app, in smoked glass on a near black page with two soft lights behind and a grain, like a Dribbble shot. It arrives with the flight on time; then the delay comes in: an amber light runs around the edge and across the glass, the glass gives a small shake like a haptic tap, the plane in the tile becomes a clock and the status, the boarding time digit by digit and the gate roll to the new values. Tapped, it opens on a real spring: the route with the new times and the old ones struck through, the plane on the dashed line, the gate change with the arrow drawing itself and the new gate popping out, and two buttons. Got it closes it again; dragged sideways it follows the finger, leans and past the line flies away.

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>
<!--
  "Delayed flight notification" 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 delayed flight notification that opens on the gate change</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">
    <!-- two soft lights behind the glass, so the frosted glass has something to blur, and a very fine grain -->
    <div class="aura" aria-hidden="true"><span class="aura__a"></span><span class="aura__b"></span></div>
    <div class="grain" aria-hidden="true"></div>

    <!-- the live notification of an airline app: compact it says the flight, the status, the boarding time and the
         gate; when the flight is delayed the news rolls in, and tapped it opens on the new times and the gate change.
         Swiped sideways it goes away and comes back with the next update -->
    <div class="slot" data-slot>
      <section class="live" data-card aria-label="Flight status">
        <span class="live__light" aria-hidden="true"></span>
        <span class="live__wash" data-wash aria-hidden="true"></span>
        <span class="live__beam" data-beam aria-hidden="true"></span>

        <button class="live__head" type="button" data-head aria-expanded="false" aria-controls="more">
          <span class="tile" data-tile aria-hidden="true">
            <svg class="tile__plane" data-tplane viewBox="0 0 24 24">
              <path d="M21 15.2v-1.7l-7.6-4.6V4.1c0-.8-.6-1.6-1.4-1.6s-1.4.8-1.4 1.6v4.8L3 13.5v1.7l7.6-2.3v4.6l-2.1 1.5v1.4l3.5-1 3.5 1v-1.4l-2.1-1.5v-4.6z"/>
            </svg>
            <svg class="tile__clock" data-tclock viewBox="0 0 24 24">
              <circle cx="12" cy="12" r="8.2"/>
              <path data-hand d="M12 7.6V12l3 1.9"/>
            </svg>
          </span>
          <span class="head__text">
            <span class="head__title"><span data-flight>AL 418</span> to <span data-city>Copenhagen</span></span>
            <span class="head__sub">
              <span class="roll head__status" data-status><span class="r">On time</span></span>
              <span class="head__dot" aria-hidden="true">·</span>
              <span class="head__board">Boards</span>
              <span class="chars" data-time></span>
            </span>
          </span>
          <span class="gate">
            <span class="gate__label">Gate</span>
            <span class="roll gate__code" data-gate><span class="r">B12</span></span>
          </span>
        </button>

        <div class="live__more" id="more" data-more>
          <span class="rule" aria-hidden="true"></span>

          <div class="route" data-part>
            <div class="route__end">
              <span class="route__code">LIS</span>
              <span class="route__time"><span class="chars" data-dep></span><span class="was" data-depwas><span data-depold></span><i data-strike></i></span></span>
            </div>
            <div class="route__track" aria-hidden="true">
              <svg class="route__dash" viewBox="0 0 100 2" preserveAspectRatio="none"><path data-dash d="M0 1H100"/></svg>
              <span class="route__go" data-go><svg class="route__plane" viewBox="0 0 24 24"><path d="M21 15.2v-1.7l-7.6-4.6V4.1c0-.8-.6-1.6-1.4-1.6s-1.4.8-1.4 1.6v4.8L3 13.5v1.7l7.6-2.3v4.6l-2.1 1.5v1.4l3.5-1 3.5 1v-1.4l-2.1-1.5v-4.6z"/></svg></span>
              <span class="route__len" data-len>3h 05m</span>
            </div>
            <div class="route__end route__end--to">
              <span class="route__code">CPH</span>
              <span class="route__time"><span class="chars" data-arr></span><span class="was" data-arrwas><span data-arrold></span><i data-strike></i></span></span>
            </div>
          </div>

          <div class="change" data-part>
            <div class="change__text">
              <span class="roll change__title" data-ctitle><span class="r">Gate</span></span>
              <span class="roll change__note" data-cnote><span class="r">Terminal 1 · 6 min walk</span></span>
            </div>
            <div class="change__gates">
              <span class="pill pill--old" data-oldpill><span data-oldgate>B12</span><i data-strike></i></span>
              <svg class="change__arrow" data-arrow viewBox="0 0 22 12" aria-hidden="true"><path pathLength="1" d="M1 6h18M15 1.8L19.4 6 15 10.2"/></svg>
              <span class="pill pill--new" data-newpill><span data-newgate>C4</span></span>
            </div>
          </div>

          <div class="acts" data-part>
            <button class="act act--ghost" type="button" data-rebook><span class="act__face"><span class="roll" data-rebookw><span class="r">Rebook</span></span></span></button>
            <button class="act act--solid" type="button" data-gotit><span class="act__face">Got it</span></button>
          </div>
        </div>
      </section>
    </div>
    <p class="sr" aria-live="polite" data-say></p>
  </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.

37 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 “Delayed flight notification” 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

In the middle, on a near black page with a blue light high on the left, an amber light lower down and a very fine grain, a smoked glass notification 70 pixels tall comes down from the top: the glass blurs the lights behind it, its one pixel edge catches the light at the top and goes into shadow at the bottom, and under it there are three soft shadows. On the left the blue tile of the app with the plane, in the middle AL 418 to Copenhagen and under it, in light blue, On time · 14:25, on the right the gate, B12. After a moment the delay comes in: an amber light runs once around the edge, a band of light crosses the glass, the notification gives a small shake like the phone’s vibration, the tile turns amber and the plane turns away for a clock whose hand winds back; the status rolls to Delayed 45 min in amber, the boarding time changes digit by digit to 15:10 and the gate rolls to C4, while the amber light behind grows warmer. Tapped, the notification stretches on a spring with a hair of bounce and its corners round off: a thin rule widens, then one after the other come the route (LIS with 15:40 in amber and 14:55 struck by a line that draws itself, the dashed line flowing with the plane moving forward a little, the duration, CPH with the new arrival and the old one struck), the gate change card (Gate changed, Terminal 1 · 9 min walk; B12 is struck and takes a small step back, the arrow draws itself and the amber C4 pops out with a halo that widens once) and the two buttons Rebook and Got it. Rebook sinks under the finger, its words shimmer on Finding seats and then tell the seat held on the next flight. Got it sinks and the notification closes again. Dragged sideways it follows the finger leaning and fading; short of the line it springs back into place, past it (or flicked) it flies away, and a moment later a new one arrives. With the mouse over it a soft light follows the pointer on the glass. Until someone touches it, it goes round by itself.

How it works

A real spring as an ease

At start a small function solves a damped spring in steps of 1/240 of a second (force STIFFNESS, damping DAMPING) until it stops: the curve becomes a GSAP ease and the settling time its duration. So opening, closing and coming back have the bounce of a real spring, and the knobs change the physics rather than a canned curve.

Glass in layers

The notification (moved only by GSAP: x, y, scale, rotation, height, radius) has the glass as a backdrop-filter over two blurred lights of the page, the one pixel edge and three shadows; inside, absolute layers: the light under the pointer driven by two CSS variables, the amber band that crosses the glass and the edge that lights up, a conic-gradient masked to the outline only, its angle registered with @property and turned by GSAP.

Words that roll

Every value that changes (status, gate, times) is a grid with a single cell: the new words come in from below on an elastic spring losing a blur, the old ones leave at the top and are removed, and the box’s width goes from the old to the new on a softer spring. The times have one box per digit and only the digits that change roll, one after the other.

Opening as a choreography

The open height is measured (the lower part stays in the flow, hidden by the overflow) and measured again on resize; the rule widens, the three parts rise staggered losing their blur, the plane moves along the dashed line that flows with strokeDashoffset, and then the old times are struck, the arrow draws itself with pathLength 1 and the new gate pops out with a halo that widens once.

Drag to dismiss

With Pointer Events the notification follows the finger only when the gesture is more horizontal than vertical (touch-action: pan-y keeps the page scrolling), leaning in proportion and fading; the speed is a moving average of the last moves. Past SWIPE of its width or with a quick flick it flies away with a duration taken from the speed, otherwise it springs back; the click that follows a drag is ignored.

Values to change

NameFileDefaultWhat it changes
FLIGHTscript.jsAL 418The flight number.
CITYscript.jsCopenhagenThe city the flight goes to.
BOARDSscript.js14:25The boarding time before the delay (departure and arrival are worked out from it).
DELAYscript.js45The delay, in minutes.
GATEscript.jsB12The gate before the change.
NEW_GATEscript.jsC4The new gate.
STIFFNESSscript.js260The force of the spring that opens and closes: higher is quicker.
DAMPINGscript.js25The damping: lower, it bounces more before it stops.
SWIPEscript.js0.3How far to drag it (share of its width) before it flies away.
SPEEDscript.js1The speed of the round on its own: 2 twice as fast, 0.5 half.
AUTOscript.jstrueIt goes round by itself until someone touches it.

Try them in the Playground

When to use it

For the app or site of an airline, an airport, a travel agency or a flight tracking app: telling about a delay or a gate change without opening a page. It works for any live update with a before and an after: a delayed train, a moved order, a changed appointment.

On phones

On the phone the notification is 92% of the screen wide and a long title ends with an ellipsis; it opens with a tap and goes away with a sideways finger while the page keeps scrolling vertically. The light that follows the pointer is not there, the rest is the same.

With reduced motion

Nothing moves: the notification appears and leaves with a fade, opens and closes without the spring, the words and times change in place with a fade, the clock takes the plane’s place, the strike lines and the arrow are already drawn.

Pitfalls

  • The digit boxes, grids whose cell stretches by itself, measured the new digit as wide as the old one and the width never changed: the cells have justify-items, so each text measures its true width.
  • The click that comes at the end of a drag opened the notification while it was springing back: after a real drag the next click is ignored.
  • The round on its own started when the script was read, and the poster landed on different moments: it starts from the page’s load event.
  • With overflow: hidden the closed notification could scroll inside: a click or Tab on a hidden button scrolled it to that button and the head vanished, leaving an empty glass. Now it is overflow: clip and the lower part, when closed, is inert.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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