Skip to content
animorio
IT
All components

SLA timer

Timers, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.7 KBGSAP 28 KBFreeDownload the zip

The first-reply timer of a support ticket, in a card on white: the minutes left, large, and under them the bar of the time allowed getting shorter. While there is room it is green and says “On track”; under a third it turns amber, “Due soon”, with a start; at zero it turns red and hatched, “Overdue”. “Reply to Dana” stops it all: the pill gets its tick and “Met”, and in place of the countdown you read how many minutes the reply took.

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>
<!--
  "SLA timer" 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>SLA timer</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 response timer of a support ticket: the time left for the first reply draining on a bar and changing
         tone as it tightens, Reply stopping it and writing how long the answer took -->
    <section class="sl" data-sl aria-label="Support ticket">
      <header class="sl__head">
        <span class="sl__id">Ticket 4821, high priority</span>
        <span class="sl__state" data-state><svg viewBox="0 0 12 12" aria-hidden="true"><path pathLength="1" d="M2.400 6.300 4.900 8.700 9.700 3.500"></path></svg><span class="sl__clip"><span data-outstate>On track</span></span></span>
      </header>
      <div class="sl__what"><strong>Can’t log in after the update</strong><span>Dana K., on the Team plan</span></div>

      <div class="sl__clock" data-clock>
        <span class="sl__label"><span class="sl__clip"><span data-outlabel>First reply due in</span></span></span>
        <p class="sl__time" role="timer"><b data-outnum>12</b><i data-outunit>min</i></p>
        <div class="sl__bar" aria-hidden="true"><i data-fill></i></div>
        <span class="sl__ends" aria-hidden="true"><span>Opened 2:14 pm</span><span data-outdue>Due 2:44 pm</span></span>
      </div>

      <button type="button" class="sl__btn" data-reply><span class="sl__clip"><span data-outbtn>Reply to Dana</span></span></button>
    </section>
    <span class="live" aria-live="polite" data-live></span>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.

21 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 “SLA timer” 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 rounded card: at the top “Ticket 4821, high priority” and on the right the green pill “On track”. Below, “Can’t log in after the update” and “Dana K., on the Team plan”. Then a light grey box: “First reply due in”, the large green number “12” with “min” beside it, a green bar less than half full and, under it, “Opened 2:14 pm” on the left and “Due 2:44 pm” on the right. At the bottom the dark button “Reply to Dana”. Time runs faster than real: the minutes go down one at a time with a small kick and the bar shortens. At ten minutes the box gives a start and number, bar and pill turn amber: “Due soon”. Tapping “Reply to Dana” stops the count, the pill draws its tick and says “Met”, the label becomes “First reply sent in” with the minutes that passed, and the button empties into “Reopen ticket”. Letting it run to zero, everything turns red, the bar stays empty and hatched, the label says “First reply overdue by” and the minutes start going up; replying then makes the pill say “Missed”.

How it works

One number

Everything comes from the seconds left: the written number, the length of the bar and the tone. Below zero the lateness is the same number with its sign changed.

Three tones

A single colour, kept in a variable: changing the card’s class changes it for number, bar and pill together, with a fade.

The start

The box shakes only when the tone gets worse: a little for amber, more for red.

Stopping

Replying stops the count and turns the question round: no longer how long is left, but how long it took.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#1f9d6bThe colour of the time when on track.
LIMITscript.js30How many minutes are allowed for the first reply.
LEFTscript.js12How many minutes are left when the card opens.
SPEEDscript.js40How many ticket seconds pass in one real second: 1 is real time.
LOOPscript.jstrueLeft alone, the demo’s pointer waits for time to tighten, replies and reopens the ticket.

Try them in the Playground

When to use it

In a ticket view of a support app, a shared inbox or a request tracker; the same card carries a quote’s deadline, the time of a promised delivery, the pick-up of a fault report or the answer to an offer.

On phones

The card is at most 348 pixels wide and about 300 tall. A long title is cut with an ellipsis; the button is 44 pixels tall and as wide as the card.

With reduced motion

Time still runs, but with no kicks or starts: number, bar, colours and texts change in one step. The demo’s pointer does not start.

Pitfalls

  • The tone is not just a colour: the pill says “On track”, “Due soon” or “Overdue”, and at zero the bar changes its drawing too.
  • Time is said in whole minutes: seconds at this speed would be only a flicker, and in a real app whoever replies thinks in minutes.
  • Every change of tone is announced to screen readers once, not at every minute.
  • In the demo time runs forty times faster: in a real app the speed knob is one.
  • Ticket, names and times are invented.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 1 December 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