Skip to content
animorio
IT
All components

Refund card

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

The refund card of an order in a made-up knitwear shop, Ferrow, alone on white: at the top the returned jumper in an oat-coloured tile and “Refund” with 89 euros; below, three steps in a row, Requested, Approved, On its way, with the green line filling up to the current step and the thin rings filling on a spring as a tick draws itself. Then the amount lifts off the refund line in a green pill and flies onto the small payment card, which takes the hit and glints, while the balance rolls digit by digit and “Arrives in 3–5 business days” turns into “Back on your card today”. Track refund opens the row with the date of each step. Minimal style.

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>
<!--
  "Refund 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>Refund card</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">
    <!-- the refund card of a made-up shop, Ferrow: the returned item and the refund, three steps that fill one by one,
         the amount that flies down onto the payment card while its balance rolls, and Track refund that opens the dates -->
    <section class="card" data-card aria-labelledby="rf-title">
      <div class="card__in" data-in>

        <header class="shop">
          <span class="shop__mark"><svg viewBox="0 0 18 18" aria-hidden="true"><path d="M4 14.5V4.2h9.6M4 9.2h7"></path></svg>Ferrow</span>
          <span class="shop__ref">Return R-20418</span>
        </header>

        <div class="item">
          <span class="thumb" aria-hidden="true"><span class="thumb__knit"></span><span class="thumb__tag"></span></span>
          <div class="item__text">
            <h2 class="item__name" id="rf-title" data-item>Merino crew jumper</h2>
            <p class="item__meta">Size M &middot; Oat &middot; 1 item</p>
          </div>
          <div class="refund">
            <span class="refund__label">Refund</span>
            <span class="refund__amt" data-amount>&euro;89.00</span>
          </div>
        </div>

        <ol class="steps" data-steps aria-label="Refund progress">
          <li class="track" aria-hidden="true"><span class="track__fill" data-fill></span></li>
          <li class="step" data-step>
            <span class="node"><svg viewBox="0 0 20 20" aria-hidden="true"><circle class="node__ring" cx="10" cy="10" r="8.4"></circle><circle class="node__full" cx="10" cy="10" r="0" data-full></circle><path class="node__tick" d="M6.4 10.3l2.4 2.4 4.9-5.1" pathLength="1" data-tick></path></svg></span>
            <span class="step__name">Requested</span>
            <span class="step__date" data-date><span>Nov 18, 09:12</span></span>
          </li>
          <li class="step" data-step>
            <span class="node"><svg viewBox="0 0 20 20" aria-hidden="true"><circle class="node__ring" cx="10" cy="10" r="8.4"></circle><circle class="node__full" cx="10" cy="10" r="0" data-full></circle><path class="node__tick" d="M6.4 10.3l2.4 2.4 4.9-5.1" pathLength="1" data-tick></path></svg></span>
            <span class="step__name">Approved</span>
            <span class="step__date" data-date><span>Nov 19, 14:30</span></span>
          </li>
          <li class="step" data-step>
            <span class="node"><svg viewBox="0 0 20 20" aria-hidden="true"><circle class="node__ring" cx="10" cy="10" r="8.4"></circle><circle class="node__full" cx="10" cy="10" r="0" data-full></circle><path class="node__tick" d="M6.4 10.3l2.4 2.4 4.9-5.1" pathLength="1" data-tick></path></svg></span>
            <span class="step__name">On its way</span>
            <span class="step__date" data-date><span data-last-date>Expected Nov 21</span></span>
          </li>
        </ol>

        <div class="pay">
          <span class="plastic" data-plastic aria-hidden="true"><span class="plastic__in"><span class="plastic__chip"></span><span class="plastic__shine" data-shine></span></span></span>
          <div class="pay__text">
            <span class="pay__name">Debit <span class="pay__dots">&bull;&bull;&bull;&bull;</span> <span data-last4>4821</span></span>
            <span class="pay__bal">Balance <span class="roll" data-balance></span></span>
          </div>
          <span class="pay__plus" data-plus aria-hidden="true"></span>
        </div>

        <footer class="foot">
          <p class="eta" data-eta>
            <span class="eta__line" data-eta-wait>Arrives in <span class="roll" data-days></span> business days</span>
            <span class="eta__line eta__line--done" data-eta-done aria-hidden="true"><svg viewBox="0 0 14 14" aria-hidden="true"><path d="M3.2 7.3l2.4 2.4 5.2-5.4"></path></svg>Back on your card today</span>
          </p>
          <button class="trackbtn" type="button" data-track aria-expanded="false">
            <span class="trackbtn__bg" aria-hidden="true"></span>
            <span class="trackbtn__label" data-track-label>Track refund</span>
            <svg class="trackbtn__chev" viewBox="0 0 12 12" aria-hidden="true"><path d="M3.2 4.7L6 7.4l2.8-2.7"></path></svg>
          </button>
        </footer>
      </div>
    </section>
    <p class="sr" aria-live="polite" data-live></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.

43 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Refund 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 white background, a white card with a soft layered shadow and a thread of light along the top edge. At the top the line mark of Ferrow, a made-up knitwear shop, and the return number. Below, the returned jumper: an oat-coloured tile with the knit rib and the neck label, Merino crew jumper, Size M · Oat, and on the right “Refund” with €89.00. Then three steps in a row, Requested, Approved, On its way, each with a thin ring: the grey line from the first to the last fills with green up to the current step, the ring reached fills from the centre on a spring, hops a pixel and a half and the white tick draws itself; the next step has a green ring and waits. Below, the small dark payment card with the gold chip, “Debit •••• 4821” and the balance. At each step the days of “Arrives in 5–7 business days” roll down, 3–5 and then 1–2. At the last step the amount lifts off the refund line in a green pill, rises slightly, tilts and curves down onto the card, which squashes and springs back while a glint passes over it; the balance rolls digit by digit from €1,204.50 to €1,293.50, +€89.00 appears beside it, “Refund” becomes “Refunded” and the amount turns green, and the bottom line becomes “Back on your card today” with a tick. Track refund, a grey pill that swells on hover and squeezes when pressed, opens the date under each step, with the chevron turning and the label becoming Hide dates.

How it works

One line, three rings on top

The grey line runs from the centre of the first step to the centre of the last and the green fill is its child, scaled with scaleX from the left: 0, 0.5 or 1. The rings have a white fill and cover the line, so the line seems to enter each ring.

The ring that fills

Inside each step’s svg a full circle grows its radius (the r attribute) from 1.6 to 8.4 with back.out, so it grows from its centre with no transform, and the tick on a pathLength 1 path draws with strokeDashoffset, autoRound off.

The amount’s flight

When it flies, the amount and the card are measured with getBoundingClientRect, a pill is created in the card and carried along a quadratic Bézier curve computed each frame, with a control point ARC pixels higher; on arrival it shrinks and fades while the card squashes on an elastic.

Rolling digits

Balance and days are built digit by digit: every digit is a column from 0 to 9 in a window one line tall, and GSAP takes it to yPercent −10 times the digit, staggered from right to left like an odometer.

Dates on request

Under each step the date sits in a zero-height box: Track refund takes it to the text’s measured height with back.out and the date drops five pixels as it fades in, staggered step by step; when done the height goes back to auto.

Values to change

NameFileDefaultWhat it changes
ITEM_NAMEscript.jsMerino crew jumperThe name of the returned item.
REFUNDscript.js89The refund amount, in euros.
BALANCEscript.js1204.5The card balance before the refund.
CARD_LAST4script.js4821The card’s last four digits.
STEP_TIMEscript.js0.75How long the line takes to reach the next step.
SPRINGscript.js1.7How far the ring overshoots when it fills.
FLIGHT_TIMEscript.js0.95How long the amount’s flight to the card lasts.
ARCscript.js46How high the amount rises before coming down on the card.
ROLL_TIMEscript.js0.8How long the digits take to roll.
LOOP_PAUSEscript.js2.6The pause once the refund has arrived before the loop starts again.

Try them in the Playground

When to use it

On the returns page of an online shop, in a marketplace or banking app, in the email or notification that says where a refund is, or in the account area of someone who has sent an order back.

On phones

The card takes the width with a margin and the spacing also follows the height with clamp, so with the dates open it all fits the phone preview box; under 360 pixels the return number hides. The flight is measured afresh each time, so it follows the card at any width. Touch replaces hover.

With reduced motion

No springs or flights: the card shows the refund at the third step straight away, rings and ticks already in place, the digits change without rolling, the dates fade in and the self-running loop does not start.

Pitfalls

  • Digits in columns with hidden overflow take their baseline from the bottom and sat higher than the text: the counter is a one-line inline-flex inside a flex row.
  • A flight measured only once at the start missed its target when the demo window changed height: the amount and the card are now measured when the flight starts.
  • With the line under see-through rings the green ran across every step: the rings are filled with the card’s colour.
  • Rolling digits need the same shape before and after (€1,204.50 and €1,293.50): if the number of digits changes the column is rebuilt without rolling.
  • Scaling the full circle, with a starting scale(0) in the CSS, pushed it off the ring: it now grows by animating the r radius, with no transform.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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