Skip to content
animorio
IT
All components

Invoice card

Cards, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 7.7 KBGSAP 28 KBFreeDownload the zip

The card of an invoice in a made-up invoicing app for freelancers, on white, in the style of real product interface pieces: the number INV-0042, the client, three lines of work and the total rolling up. With Send invoice it goes out: the status rolls from Draft to Sent, then to Viewed when the client opens it and to Paid when they pay, the timeline below lights up tick by tick and the Paid stamp lands on the total with a small squash. On hover a line lifts slightly and shows quantity and VAT. A premium minimal piece, with a single green accent.

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>
<!--
  "Invoice 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>Invoice 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 invoice card of a made-up invoicing app for freelancers: it goes out, gets opened, gets paid;
         the status rolls, the timeline lights up tick by tick and the Paid stamp lands with a squash -->
    <article class="inv" data-card data-s="0" aria-label="Invoice INV-0042">
      <header class="inv__head">
        <div class="inv__id">
          <span class="inv__label">Invoice</span>
          <span class="inv__no">INV-0042</span>
        </div>
        <span class="pill" data-pill>
          <span class="roll" data-roll="pill"><span class="roll__probe" aria-hidden="true"></span><span class="roll__line">Draft</span></span>
        </span>
      </header>

      <div class="inv__client">
        <span class="mono" data-initials aria-hidden="true">HS</span>
        <span class="client">
          <span class="client__name" data-client>Harbor &amp; Sloane</span>
          <span class="client__due">Due 7 Dec &middot; Net 14</span>
        </span>
        <span class="inv__from">From Ostro Studio</span>
      </div>

      <ul class="rows">
        <li class="row" data-row data-qty="1" data-price="1200" data-unit="day">
          <div class="row__in">
            <div class="row__main"><span class="row__name">Brand workshop</span><span class="row__amt"></span></div>
            <div class="row__more"><div class="row__more-in"><span class="row__qty"></span><span class="row__vat"></span></div></div>
          </div>
        </li>
        <li class="row" data-row data-qty="24" data-price="85" data-unit="h">
          <div class="row__in">
            <div class="row__main"><span class="row__name">Website design</span><span class="row__amt"></span></div>
            <div class="row__more"><div class="row__more-in"><span class="row__qty"></span><span class="row__vat"></span></div></div>
          </div>
        </li>
        <li class="row" data-row data-qty="6" data-price="60" data-unit="pages">
          <div class="row__in">
            <div class="row__main"><span class="row__name">Copywriting</span><span class="row__amt"></span></div>
            <div class="row__more"><div class="row__more-in"><span class="row__qty"></span><span class="row__vat"></span></div></div>
          </div>
        </li>
      </ul>

      <div class="inv__total">
        <span class="total__label">Total due<span class="total__vat" data-vat-total></span></span>
        <span class="total" data-total>&euro;0.00</span>
        <span class="stamp" data-stamp aria-hidden="true">
          <span class="stamp__in" data-stamp-in>
            <svg class="stamp__svg" viewBox="0 0 132 56">
              <defs>
                <filter id="ink" x="-5%" y="-10%" width="110%" height="120%">
                  <feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="2" seed="4" result="n"></feTurbulence>
                  <feDisplacementMap in="SourceGraphic" in2="n" scale="1.6"></feDisplacementMap>
                </filter>
              </defs>
              <g filter="url(#ink)">
                <rect x="2" y="2" width="128" height="52" rx="8" class="stamp__ring"></rect>
                <rect x="6.5" y="6.5" width="119" height="43" rx="5" class="stamp__ring stamp__ring--thin"></rect>
                <text x="66" y="33" class="stamp__word" text-anchor="middle">PAID</text>
                <text x="66" y="44.5" class="stamp__date" text-anchor="middle">23 NOV 2026</text>
              </g>
            </svg>
          </span>
        </span>
      </div>

      <div class="tl" aria-hidden="true">
        <span class="tl__track"><span class="tl__fill" data-fill></span></span>
        <span class="step is-on" data-step><span class="tick"><span class="tick__mark"></span></span><span class="step__label">Draft</span></span>
        <span class="step" data-step><span class="tick"><span class="tick__mark"></span></span><span class="step__label">Sent</span></span>
        <span class="step" data-step><span class="tick"><span class="tick__mark"></span></span><span class="step__label">Viewed</span></span>
        <span class="step" data-step><span class="tick"><span class="tick__mark"></span></span><span class="step__label">Paid</span></span>
      </div>

      <footer class="inv__foot">
        <button class="btn" type="button" data-btn>
          <span class="btn__face">
            <span class="btn__icons" aria-hidden="true">
              <svg class="ic" data-ic="0" viewBox="0 0 20 20"><path d="M4 10h11M11 5.5 15.5 10 11 14.5"/></svg>
              <svg class="ic" data-ic="1" viewBox="0 0 20 20"><path d="M6 13.5V9.2a4 4 0 0 1 8 0v4.3l1.3 1.5H4.7L6 13.5Z"/><path d="M8.6 16.8a1.6 1.6 0 0 0 2.8 0"/></svg>
              <svg class="ic" data-ic="2" viewBox="0 0 20 20"><path d="M10 3.8v8.6M6.3 9 10 12.7 13.7 9"/><path d="M4.5 15.8h11"/></svg>
            </span>
            <span class="roll" data-roll="btn"><span class="roll__probe" aria-hidden="true"></span><span class="roll__line">Send invoice</span></span>
          </span>
        </button>
        <span class="note"><span class="roll" data-roll="note"><span class="roll__probe" aria-hidden="true"></span><span class="roll__line">Not sent yet</span></span></span>
      </footer>
      <p class="sr" aria-live="polite" data-live></p>
    </article>
  </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.

40 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 “Invoice 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 white, a card thirty em wide with a thin border and a soft shadow. At the top “Invoice”, the number INV-0042 and on the right the status pill, Draft. Below, the client, Harbor & Sloane, with their initials in a grey circle and the due date, and on the right who sends it, Ostro Studio. The three lines come in one after the other from below and the total counts from zero up to €4,392.00 with the 22% VAT written below. Hovering a line, it lifts two pixels, takes a faint grey background and underneath opens the quantity times the price and that line’s VAT. Further down a hairline with four vertical ticks, Draft, Sent, Viewed, Paid: the first is lit. Pressing Send invoice the button squashes and returns with an elastic, turns white with a border and the label rolls to Send reminder, the arrow making way for the bell; the pill rolls to Sent and the line under the button says who it went to and when. The green line runs to the second tick, which rises on a spring. A moment later the client opens it: Viewed, third tick. Then they pay: the pill turns green and says Paid, the line reaches the end, the total turns green and swells slightly, and the Paid stamp drops from above, tilted, with its double border and the date, squashing as it hits the paper and settling with an elastic while the card jolts two pixels. The button becomes Receipt with the arrow dropping into the tray. Pressing Send reminder the bell shakes and the line says “Reminder sent”; pressing Receipt the arrow drops and the line says who the receipt went to. After a pause the stamp fades and everything goes back to Draft.

How it works

The rolling windows

Status, button and note sit in one-line windows with hidden overflow: the new line comes in from yPercent 110 with back.out, the old one leaves upwards and is removed. The window width animates from the old size to the new one, taken from a hidden probe holding the same text, so the pill and the button widen on a spring.

The counting total

The total is a number in an object that GSAP takes from zero to the value, writing it every frame with toLocaleString and two decimals; the digits are tabular-nums and don’t wobble.

The timeline ticks

A single green line with its transform origin on the left: scaleX goes to 0, one third, two thirds, one, because the ticks sit at the centre of four equal columns. Each lit tick changes colour and height in CSS and GSAP gives it a small scaleY on a spring.

The squashing stamp

The stamp is an SVG with a double border and the date, with a light feTurbulence and feDisplacementMap filter that gives the edges an ink feel. The outer wrapper drops from scale 1.9 with power3.in and rotates to its tilt; the inner one squashes to 1.08 by 0.86 on contact and comes back with elastic.out. One element for the scale, one for the squash.

The line that shows the VAT

Under each line there is a block in a grid with grid-template-rows going from 0fr to 1fr: on hover it opens without measuring heights. The lift is a CSS transition on the child, because GSAP moves the parent on entry.

Values to change

NameFileDefaultWhat it changes
CLIENTscript.jsHarbor & SloaneThe client the invoice goes to.
CONTACTscript.jsMara QuinnWho opens and pays the invoice.
VAT_RATEscript.js22The VAT rate in percent, on the lines and the total.
CURRENCYscript.js€The currency symbol.
VIEW_DELAYscript.js1.6Seconds between sending and the client opening it.
PAY_DELAYscript.js2.2Seconds between opening and payment.
STAMP_TILTscript.js-9The tilt of the Paid stamp, in degrees.
SPRINGscript.js1.6How much the pill, the button and the stamp bounce.
LOOP_PAUSEscript.js2.8The pause once paid before the loop starts again.

Try them in the Playground

When to use it

In the dashboard of an invoicing or accounting app, in the client area of a studio or a freelancer, on a SaaS page showing how it tracks payments, or wherever something goes through a few states until “done”.

On phones

Everything is measured in em and the text size depends on both the width and the height of the window: in the phone preview box the card stays inside, smaller. Under 380 pixels “From Ostro Studio” disappears. Tapping a line does what hover does: it lifts it and shows the VAT.

With reduced motion

No movement or springs: the total appears already complete, the states crossfade without rolling, the timeline fills in an instant and the stamp fades in.

Pitfalls

  • An inline-grid window holding two lines takes the width of the longer one and then snaps when the old one goes: so the width is animated by hand from the hidden probe, and recomputed on resize because the text size changes with the window.
  • The stamp has two elements: with the scale and the squash on the same element, the drop and the bounce cancelled each other.
  • The row lift on hover is on the child: GSAP writes the transform on the parent on entry and would have wiped the CSS one.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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