Skip to content
animorio
IT
All components

Deadlines card

Cards, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 9.5 KBGSAP 28 KBFreeDownload the zip

The tax deadlines card an invented accounting firm, Fenwick & Rowe, shows its client, white on white with a sage green, like a Dribbble shot. At the top the big number of days left, below it the bar of the next twelve weeks with the months and a mark for each deadline, and the list: quarterly VAT, payroll, corporation tax, each with its little calendar tile. Pick a deadline and the days roll like an odometer, the bar stretches to the date on a spring with a glint running along it, the pill slides under the row, and «Add to calendar» fills from its icon and becomes «Added» with a tick drawing itself.

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>
<!--
  "Deadlines 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>The accounting firm's deadlines card with the days that roll</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 client card of Fenwick & Rowe, an invented accounting firm: the next tax deadlines of a client company.
         Pick a deadline and the days left roll like an odometer, the bar of the coming weeks stretches to its date
         on a spring, and Add to calendar turns into a confirmation with a drawn tick -->
    <article class="due" data-card aria-labelledby="due-title">
      <span class="due__edge" aria-hidden="true"></span>

      <header class="due__head">
        <span class="mark" aria-hidden="true">
          <svg viewBox="0 0 36 36">
            <defs>
              <linearGradient id="mk-a" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="#1d8a6c"/><stop offset="1" stop-color="#0b4f40"/></linearGradient>
            </defs>
            <rect width="36" height="36" rx="10" fill="url(#mk-a)"/>
            <path d="M11 25V11h9M11 18h7" fill="none" stroke="#fff" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"/>
            <path d="M20.5 25l5-7" fill="none" stroke="#bfe9da" stroke-width="2.2" stroke-linecap="round"/>
            <rect x="0.5" y="0.5" width="35" height="35" rx="9.5" fill="none" stroke="#fff" stroke-opacity=".22"/>
          </svg>
        </span>
        <span class="due__who">
          <span class="due__firm">Fenwick &amp; Rowe</span>
          <span class="due__client">Halden Design Ltd · Tax calendar</span>
        </span>
      </header>

      <section class="hero" aria-live="polite">
        <div class="hero__count">
          <span class="days" data-days aria-hidden="true"></span>
          <span class="hero__unit">
            <span class="hero__unit-word">days left</span>
            <span class="hero__date" data-date></span>
          </span>
          <span class="sr" data-sr></span>
        </div>
        <button class="add" type="button" aria-pressed="false" data-add>
          <span class="add__fill" aria-hidden="true"></span>
          <svg class="add__icon" viewBox="0 0 20 20" aria-hidden="true">
            <g class="add__cal"><rect x="3.2" y="4.4" width="13.6" height="12.4" rx="2.6"/><path d="M3.2 8.4h13.6M7 2.8v3M13 2.8v3"/><path class="add__plus" d="M10 10.6v4M8 12.6h4"/></g>
            <path class="add__tick" d="M5.4 10.4l3 3 6.2-6.6"/>
          </svg>
          <span class="add__labels">
            <span class="add__label add__label--off">Add to calendar</span>
            <span class="add__label add__label--on" aria-hidden="true">Added</span>
          </span>
        </button>
      </section>
      <p class="hero__what"><span data-name></span><span class="hero__sep">·</span><span class="hero__state" data-state></span></p>

      <div class="track" aria-hidden="true" data-track>
        <span class="track__rail"></span>
        <span class="track__fill" data-fill><span class="track__glint" data-glint></span></span>
        <span class="track__today"></span>
        <span class="track__months" data-months></span>
        <span class="track__ticks" data-ticks></span>
      </div>

      <div class="list" role="group" aria-labelledby="due-title" data-list>
        <h2 class="sr" id="due-title">Upcoming tax deadlines</h2>
        <span class="list__pill" aria-hidden="true" data-pill></span>
      </div>
    </article>
    <svg class="pointer" viewBox="0 0 24 24" aria-hidden="true" data-pointer><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z"/></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.

26 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 “Deadlines 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

A white card with a fine grain and an edge that catches a green light where the pointer goes. On entry the parts rise staggered and the bar of the coming weeks stretches to the first deadline. Pick another deadline (by click or with the up and down arrows) and the two digits of the days roll like an odometer, forward when more days are left and backward when fewer, with a small overshoot; the bar stretches or pulls back to the date on a spring and a glint runs along it, the deadline's mark rises, the white pill slides under the row and the calendar tile lights up green with a bounce; the date, the name and the state (ready, documents missing in orange, not started, each with its drawn icon) leave upwards and come back from below. «Add to calendar» fills with green as a circle from its icon, the calendar turns and vanishes, the tick draws itself and the label becomes «Added» while the button narrows to the new word; the list row is marked with a small ticked calendar.

How it works

The odometer of days

Each digit is a column with a strip of thirty digits, 0 to 9 three times, moved with yPercent (one step is 100/30). At rest the strip sits in the middle copy; if the number goes up while the digit goes down (9 to 2) it moves forward into the third copy, if the number goes down while the digit goes up it moves back into the first, so every digit always turns the right way along the shortest path. At the end the strip quietly jumps back to the middle copy. The tens start 60 milliseconds after the units, with back.out (SPRING); under ten the tens column narrows to zero.

The bar of the weeks

The rail is a repeating gradient of fine dashes; above it, the fill is 100% wide and GSAP gives it scaleX = days / (WEEKS_SHOWN × 7) with a left transform-origin and back.out, so it stretches and pulls back on a spring without recomputing widths. A 30% wide white glint runs along it with xPercent after each choice. The deadline marks, the first-of-the-month notches and the month names (in the middle of their month) are percentages, so they follow the card at any width.

The pill under the row

The pill is one absolute element behind the rows: on each choice GSAP takes it to the row's offsetTop and offsetHeight with back.out, and puts it back without animation on resize, because the rows change height with the window (clamp in vh). The chosen row's calendar tile lights up with its colour in CSS and GSAP only adds the scale bounce.

Add to calendar becomes Added

A green layer inside the button goes from clip-path circle(0% at 18% 50%), the icon's spot, to circle(150%). The two labels share one grid cell with overflow hidden: the old one leaves with yPercent -110, the new one rises from 110; the cell width goes from one scrollWidth to the other, so the button narrows to the new word. The calendar turns and shrinks, the tick draws with a stroke-dasharray as long as getTotalLength(). Each deadline remembers its state.

The pilot

A drawn pointer picks payroll, adds it to the calendar, moves on to corporation tax and back to VAT; leaving, it clears the mark for the next round. Positions are functions inside the tweens, so they follow the card when the window changes, and the glowing edge follows the fake pointer like the real one. At the first real mouse move, tap or key the pilot stops.

Values to change

NameFileDefaultWhat it changes
DAYS_VATscript.js12Days left to the VAT return (1 to 99).
DAYS_PAYROLLscript.js24Days left to the payroll filing (1 to 99).
DAYS_CORPscript.js67Days left to the corporation tax (1 to 99).
WEEKS_SHOWNscript.js12Weeks covered by the bar.
ROLL_TIMEscript.js0.8Seconds for the digits to roll to the new count.
SPRINGscript.js1.5How far digits, bar and pill overshoot before settling (0 none).
SPEEDscript.js1Pilot speed.
LOOPscript.jstrueThe pilot starts over.

Try them in the Playground

When to use it

In the client area of an accounting firm, a payroll consultant or a bookkeeping and invoicing app: the first thing the client sees on arrival, how long is left and what is needed. It also works for project deadlines, subscription renewals or course dates, with new labels.

On phones

The same animation with adapted sizes: the card is 92% of the screen wide, the number, the margins and the row height also follow the window height, and under 370 pixels the button and the rows tighten their text a little. A finger picks and adds just like the mouse.

With reduced motion

Nothing moves: the numbers change without rolling, the bar, the pill and the button reach their state at once, the texts change with a fade, with no glint or bounces; the pilot's pointer is hidden.

Pitfalls

  • With only two copies of the strip, going from 24 to 67 the tens (2 to 6) turned fine but the units (4 to 7) and the way back from 67 to 12 turned one digit against the number: with three copies and the middle copy at rest every digit has room both forward and backward.
  • With both labels in the same cell the button always kept the width of «Add to calendar», and «Added» sat in a button too wide: the cell takes the width of the active label from scrollWidth, measured after the font has loaded.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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