Skip to content
animorio
IT
All components

Uptime bar chart

Charts, HoverGSAP, CSS onlyMediumCompressed weight: Demo 6.7 KBGSAP 28 KBFreeDownload the zip

The uptime row of a status page, in the simple style of product interface pieces: sixty thin bars, one per day, black when the service ran fine and orange on the three days with an incident. Sliding a finger or the mouse across the bars, the day under the pointer rises on a spring and its neighbours follow a little, the percentage rolls to that day’s value and the line below says what happened.

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>
<!--
  "Uptime bar chart" 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 uptime bar chart with days to scrub</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 uptime row of a status page: sixty thin bars, one per day. Slide across them and the day under the
         pointer rises, the percentage rolls to that day and the line below says what happened -->
    <section class="uptime" data-uptime aria-label="Payments API uptime">
      <header class="head">
        <div class="head__name">
          <h1 class="name" data-name>Payments API</h1>
          <p class="sub swap" data-sub><span>Orrin status</span></p>
        </div>
        <div class="head__read">
          <p class="pct" data-pct aria-live="polite"></p>
          <p class="when swap" data-when><span>Last 60 days</span></p>
        </div>
      </header>

      <div class="bars" data-bars tabindex="0" role="slider" aria-label="Uptime by day" aria-valuemin="1" aria-valuemax="60" aria-valuenow="60">
        <div class="bars__row" data-row></div>
        <div class="bars__base" aria-hidden="true"><i class="tick" data-tick></i></div>
      </div>

      <div class="foot">
        <p class="note swap" data-note><span></span></p>
        <p class="axis" aria-hidden="true"><span>60 days ago</span><span>Today</span></p>
      </div>
    </section>

    <svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.

19 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 “Uptime bar chart” 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, alone in the middle, sits the row of a status page: at the top the service name, «Payments API», and on the right the percentage for the last sixty days, 99.96%. Below are sixty thin bars, one per day, which on arrival rise from the base line one after another with a pixel of bounce while the digits of the percentage roll into place. The bars are black; three are orange: solid for the real outage, lighter for the two slowdowns. Hovering with the mouse, or dragging a finger, the day under the pointer rises on a spring and the two or three bars next to it rise a little with it, like a dock; the others fade. Under the bars a thin tick slides along the base line to the chosen day and settles. At the top the percentage rolls to that day’s value (100.00 when all went well: the first digit opens up by itself), the date replaces «Last 60 days» and the line at the bottom says what happened, for example «Partial outage · 23 min, card payments failing»; each new line comes up narrow from below and opens on the width axis. Leaving the bars, everything settles and the total comes back. Until someone touches them, a drawn pointer scrubs the days by itself and stops on the three incidents.

How it works

Sixty real days

The days are counted back from today with Date: each one has its date and, if there was an incident, the minutes lost. A day’s percentage is 100 minus the minutes over 1440, the one at the top the minutes of all incidents over sixty days: 36 minutes make 99.96%.

The bar and its target

Every day is a span as tall as the row, which takes the pointer, with inside the element GSAP scales from the bottom: the column under the pointer is found from the x alone, so even between two bars a day is always picked.

The dock of bars

When the day changes every bar goes to 1 plus LIFT times a gaussian of its distance from the chosen day (SPREAD is its width), with back.out: the chosen one rises most, its neighbours less, and all bounce by a pixel. The room above the row is computed from the bars’ real height, so the raised bar never touches the title.

The rolling digits

The percentage is made of columns from 0 to 9 sliding with yPercent, decimals first. The first digit is always there but zero wide: for 100.00 its width goes to the column’s width and the number opens up without jumping.

The lines that swap

The date and the incident line sit in the same grid cell: the old one rises and fades, the new one comes up from below with font-stretch from 84 to 100 on back.out; scrubbing fast, the old ones remove themselves at the end of their exit.

Values to change

NameFileDefaultWhat it changes
SERVICEscript.jsPayments APIThe service name at the top.
ACCENTscript.js#f2610cThe colour of the days with an incident (lighter for slowdowns).
LIFTscript.js0.22How much the bar under the finger rises, as a share of its height.
SPREADscript.js1.3How many neighbouring bars rise with it: 0.5 only that one, 3 a wide wave.
BOUNCEscript.js1.8How much the bars bounce when they rise and settle.
SPEEDscript.js1The speed of everything: 2 twice as fast, 0.5 half.
HOLDscript.js1.4The seconds the fake pointer stops on a day with an incident.
AUTOscript.jstrueThe fake pointer scrubs the days by itself until someone touches them.

Try them in the Playground

When to use it

For the status page of an app or an API, for a service-health panel in a dashboard, or to show customers how reliable a product is: the total reads at once, each day’s detail one swipe away.

On phones

On the phone a finger drags across the bars (touch-action pan-y: the page still scrolls vertically); letting go, everything settles. Sizes come from the screen with clamp and the row is at most 90% of the window wide.

With reduced motion

The bars do not rise: the chosen day stays solid and the others fade; digits and lines change with a fade. Instead of the scrubbing pointer, the selection steps from one incident to the next with fades.

Pitfalls

  • Without tabular-nums (with Mona Sans the zero comes out slashed) digits have different widths: each column holds all ten digits, so it takes the width of the widest and the number does not wobble as it rolls.
  • From 99.96 to 100.00 the number changes length: rebuilding the columns would make it jump. The first column always stays there, zero wide, and opens only for 100.
  • With the raised bar taller than the row, it touched the title: the room above the bars is recomputed on resize from the real height and LIFT, so even with LIFT at its maximum it stays inside.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 31 October 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