Skip to content
animorio
IT
All components

Return approved notification

Notifications, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 7.8 KBGSAP 28 KBFreeDownload the zip

The notification of Aldermoor, a made-up clothing shop, on white: “Return approved” drops in on a spring, with the €64 refund still grey. Touched, it opens into a small three-stop track: the parcel jumps out of the icon, lands on the first stop, runs along the dotted line that turns green behind it, and at the end slips into the drawn card, which takes the knock and shows the refund; up top the amount turns green with its plus and the line says Refunded with a tick.

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>
<!--
  "Return approved 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 return approved notification with the parcel that turns into the refund</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 notification of a made-up clothing shop, Aldermoor: «Return approved» drops in; touched, it opens into a small
         track with three stops, the parcel runs along it, slips into the card drawn at the end and becomes the refund -->
    <section class="wrap" data-wrap aria-label="Notifications">
      <article class="note" data-note tabindex="0" aria-expanded="false">
        <div class="note__row" data-row>
          <span class="ico" data-ico aria-hidden="true">
            <i class="ico__shine" data-shine></i>
            <svg viewBox="0 0 24 24" data-box>
              <path class="box__body" d="M4.5 8.2 12 4.4l7.5 3.8v8.1L12 20.1l-7.5-3.8z"></path>
              <path class="box__fold" d="M4.5 8.2 12 12l7.5-3.8M12 12v8.1"></path>
              <path class="box__tape" d="M8.2 6.3l7.5 3.8"></path>
            </svg>
          </span>
          <div class="note__text">
            <p class="note__title"><span class="note__head" data-title>Return approved</span><span class="note__when">now</span></p>
            <p class="note__sub"><b>Aldermoor</b> · Linen overshirt, M</p>
          </div>
          <div class="note__money">
            <p class="amount" data-amount><span class="amount__sign" data-sign>+</span>€64.00</p>
            <p class="state" data-state><svg class="state__tick" viewBox="0 0 12 12" aria-hidden="true"><path data-tick d="M2.6 6.3l2.2 2.2 4.6-4.8"></path></svg><span data-state-text>Refund on the way</span></p>
          </div>
        </div>

        <div class="note__more" data-more>
          <div class="track" data-track>
            <svg class="track__line" data-line aria-hidden="true"><path class="track__base" data-base></path><path class="track__done" data-done></path></svg>
            <ol class="stops">
              <li class="stop" data-stop><span class="stop__dot"><svg viewBox="0 0 12 12"><path d="M2.6 6.3l2.2 2.2 4.6-4.8"></path></svg></span><span class="stop__name">Received</span></li>
              <li class="stop" data-stop><span class="stop__dot"><svg viewBox="0 0 12 12"><path d="M2.6 6.3l2.2 2.2 4.6-4.8"></path></svg></span><span class="stop__name">Inspected</span></li>
              <li class="stop stop--card" data-stop>
                <span class="card" data-card aria-hidden="true">
                  <i class="card__shine" data-card-shine></i>
                  <span class="card__chip"></span>
                  <span class="card__brand">VISA</span><span class="card__num">4821</span>
                  <span class="card__plus" data-plus>+€64</span>
                </span>
                <span class="stop__name">Refunded</span>
              </li>
            </ol>
            <span class="parcel" data-parcel aria-hidden="true">
              <svg viewBox="0 0 24 24"><path class="box__body" d="M4.5 8.2 12 4.4l7.5 3.8v8.1L12 20.1l-7.5-3.8z"></path><path class="box__fold" d="M4.5 8.2 12 12l7.5-3.8M12 12v8.1"></path></svg>
            </span>
          </div>
          <div class="note__foot">
            <p class="note__meta">Back on Visa ending 4821 · 3–5 business days</p>
            <button class="receipt" type="button" data-receipt tabindex="-1">
              <span>Receipt</span>
              <span class="receipt__arr" data-arr aria-hidden="true"><svg viewBox="0 0 16 16"><path d="M3.5 8h8.6M8.6 4.4 12.2 8l-3.6 3.6"></path></svg></span>
            </button>
          </div>
        </div>
      </article>
    </section>
    <svg class="ghost" data-ghost viewBox="0 0 22 22" aria-hidden="true"><path d="M4 2.5v15.2l4.1-3.9 2.7 6.1 2.6-1.1-2.6-6h5.8z"></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.

31 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 “Return approved 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

On a white background the notification of Aldermoor, a made-up clothing shop: a white card seventy pixels tall, with round corners, a barely visible border and a wide soft shadow. It drops from the top on a short spring, the title Return approved narrows on the font’s width axis into place and a glint crosses the icon, a parcel drawn in strokes with a green tape. Under the title the shop’s name and the returned item, Linen overshirt, M; on the right the amount €64.00 still grey and the line Refund on the way. A drawn pointer touches it: the card squeezes a hair and stretches on a spring, and below opens a track with three stops, Received, Inspected and Refunded, joined by a dotted line. The parcel jumps out of the icon and lands on the first stop with a small squash; the stop fills green and swells. Then it runs along the line with a little hop to the second one, and the line behind it turns solid green; at last it reaches the credit card drawn at the end, with its gold chip, VISA and the last four digits: the parcel shrinks into the card, which takes the knock, shows +€64 on green and a glint crosses it. Up top the amount turns green, the plus slides in from the left on a spring, the line becomes Refunded and the tick draws itself. Below, a line says where the refund goes and how long it takes, with the black Receipt button: the pointer presses it, the button dips and the arrow slips out to the right and back in from the left. Then the notification closes, rises away and the round starts again.

How it works

The card and the panel

The notification is a card with an always visible row and a panel below with zero height; touched, GSAP takes the panel to its natural height on a spring.

The measured stops

The stops are measured in pixels inside the track (getBoundingClientRect) and measured again on every resize: the line is an SVG path between the first stop and the card.

The line filling in

The green line is the same path with a stroke-dasharray as long as itself: the strokeDashoffset goes down as the parcel runs, so the line fills in behind it.

The arc flight

The parcel flies on an arc: x and y interpolated between two points, minus a sine for the hop, and a small rotation in the direction it runs.

The landings and the card

At every landing a short squash and stretch (scaleY and scaleX) and the stop lights up with a class; at the card the parcel shrinks and fades, the card takes the knock and shows the refund.

The pilot

The drawn pointer’s round is a repeating timeline; as soon as the component is really used it stops and comes back after eight seconds.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#1f8f5fThe refund green: the stops done, the line filling in, the amount arrived.
AMOUNTscript.js64.00The refund amount, without the symbol.
CURRENCYscript.js€The currency symbol.
ITEMscript.jsLinen overshirt, MThe returned item, under the shop’s name.
TRAVELscript.js0.62The parcel’s seconds from one stop to the next.
HOPscript.js14How many pixels the parcel hops between stops.
SPRINGscript.js1.5How far the spring overshoots when the notification lands and opens.
HOLDscript.js2.6The seconds the open notification stays with the refund arrived.

Try them in the Playground

When to use it

For an online shop, a fashion or electronics app, a returns service: wherever a return ends in a refund and it is worth showing where the money is.

On phones

The notification takes the full width minus the margins, up to 400 pixels; below 420 pixels the time disappears and the margins narrow, so the track and the card stay whole. A tap opens and closes it.

With reduced motion

No springs or flights: the notification fades in, the panel opens without a bounce, the parcel does not run, the stops light up one after another, the line fills and the refund fades in.

Pitfalls

  • The track positions are measured with the panel in place: they are measured again at every opening and every resize.
  • The line’s path goes in a viewBox of the track in pixels, otherwise the dashes stretch on the phone.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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