Skip to content
animorio
IT
Back to the library

Notification to order transition

Transitions, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.8 KBGSAP 28 KBFreeDownload the zip

A delivery notification drops onto the screen; tapped, it becomes the order page itself: the box grows to the edges, icon and title stay where the eye left them, and the arrival time, the delivery steps and the button come in below. Back, the page is a notification again.

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>
<!--
  "Notification to order transition" 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>Notification to order page transition</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 delivery notification drops onto the screen; tapped, the banner itself grows into the order page:
         its icon and title stay where the eye left them and the delivery steps come in under them -->
    <div class="ph" data-screen>
      <div class="ph__home" data-home aria-hidden="true">
        <span class="ph__clock">14:02</span>
        <span class="ph__day">Thursday 19 November</span>
        <span class="ph__line"></span><span class="ph__line"></span><span class="ph__line"></span>
      </div>

      <section class="nt" data-nt aria-label="Order update">
        <button class="nt__hit" type="button" data-open aria-label="Open your order: out for delivery"></button>
        <header class="nt__head" data-head>
          <button class="nt__back" type="button" data-back aria-label="Back">
            <svg viewBox="0 0 18 18" aria-hidden="true"><path d="M11 4 6 9l5 5"></path></svg>
          </button>
          <span class="nt__tile" data-tile aria-hidden="true">
            <svg viewBox="0 0 24 24"><path d="M3.500 7.800 12 3.500l8.500 4.300v8.400L12 20.500l-8.500-4.300z"></path><path d="M3.500 7.800 12 12l8.500-4.200M12 12v8.500M7.700 5.700l8.600 4.300"></path></svg>
          </span>
          <span class="nt__text" data-text>
            <b data-title>Out for delivery</b>
            <span data-sub>Kiln &amp; Co., order 4471</span>
          </span>
          <span class="nt__time" data-time>now</span>
        </header>

        <div class="nt__page" data-page>
          <div class="nt__eta" data-in>
            <span>Arriving today</span>
            <b>14:20 to 14:50</b>
            <span class="nt__bar"><i data-bar></i></span>
          </div>
          <ol class="nt__steps">
            <li class="is-done" data-in><span class="nt__mark"><svg viewBox="0 0 14 14" aria-hidden="true"><path d="M3 7.300 5.800 10 11 4.300"></path></svg></span><b>Ordered</b><span>Mon, 18:12</span></li>
            <li class="is-done" data-in><span class="nt__mark"><svg viewBox="0 0 14 14" aria-hidden="true"><path d="M3 7.300 5.800 10 11 4.300"></path></svg></span><b>Packed</b><span>Wed, 09:40</span></li>
            <li class="is-now" data-in><span class="nt__mark"><svg viewBox="0 0 14 14" aria-hidden="true"><path d="M3 7h8M7.500 3.500 11 7l-3.500 3.500"></path></svg></span><b>On the way</b><span>6 stops before you</span></li>
            <li data-in><span class="nt__mark"></span><b>Delivered</b><span>Leave at the door</span></li>
          </ol>
          <button class="nt__cta" type="button" data-in tabindex="-1">Follow on the map</button>
        </div>
      </section>
    </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.

29 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 “Notification to order transition” 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

A dark screen with a large clock, like a lock screen. A white notification drops from the top: the parcel icon, “Out for delivery” and the shop’s name. Tapping it, the notification’s box grows to fill the screen and its corners take the phone’s, while the screen behind steps back and dims. Icon and title slide just a little to the right to make room for the back key, which springs in; “now” fades out. Below, the page’s pieces rise one after another with a small bounce: the arrival band with its bar filling, the four delivery steps (two done, one in progress in orange, one to come) and the “Follow on the map” button. With the back key, or Esc, the same timeline runs in reverse and faster: the page closes back into the notification, which then lifts away.

How it works

The same element

Notification and page are one box: left, right, top, height and radius change, from the banner’s to the screen’s. So icon and title are neither copied nor swapped: they are the same ones.

One timeline, two speeds

The timeline is built once, paused. Opening is play, closing is reverse, with different timeScales: the way in takes its time, the way back is quicker.

Rebuilt on resize

The page’s height is the screen’s in pixels: when the window changes, the timeline is rebuilt and picks up from where it was, even half way through.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#ff6a2bThe delivery colour.
OPENscript.js0.75How many seconds the notification takes to become the page.
CLOSEscript.js0.5How many seconds the page takes to become a notification again.
OVERSHOOTscript.js1.4How much the page’s pieces bounce as they come in (0 = none).
STAGGERscript.js0.06The gap between one piece of the page and the next, in seconds.
PROGRESSscript.js0.68How far the parcel has come (0 to 1).
LOOPscript.jstrueLeft alone, a pointer opens the notification and goes back.

Try them in the Playground

When to use it

In a shop’s, a courier’s or a food delivery app, when an in-app notification leads to the order page; and for any alert that opens its detail: a message, a payment received, a reminder.

On phones

The same scene, as wide as the screen and also sized on the window’s height: the notification is tapped with a finger and the back key is big enough for a thumb.

With reduced motion

No growing and no sliding: tapping the notification, the page appears already open, and the back key brings the notification back.

Pitfalls

  • Shop, order and times are made up. Real system notifications cannot be animated like this: this is an in-app notification, drawn by the app.
  • Animating left, right, top and height relayouts on every frame: fine for a single box like this one; with heavy content inside, the FLIP technique with transforms is the better choice.
  • Opening moves focus to the back key and closing returns it to the notification; Esc closes. The closed page’s buttons stay out of the keyboard’s way.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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