Skip to content
animorio
IT
Back to the library

Performance score rings

SVG, HoverGSAP, CSS onlyMediumCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

The report of a site audit in a made-up developer tool, Kestrel Audit, for the checkout page of a made-up shop: four rings drawn in SVG (Performance, Accessibility, Best practices, SEO) fill one after the other, 0.36 s apart, with the number counting in the middle and the colour going from red to orange to green as it climbs; the arc goes a point and a half too far and settles back. Below, the filmstrip of the six frames of the page loading with a playhead of light running over them, and the three metrics LCP, CLS and TBT with their bars over the three zones. Over a ring the lower half turns into the detail with the three things to fix, the notch sliding to the ring on a spring; «Run again» drains everything and audits again, with numbers that move a little.

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>
<!--
  "Performance score rings" 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 performance report with the score rings that fill up</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 audit report of a made-up developer tool, Kestrel Audit, for a made-up shop. Four score rings fill one
         after the other with the number counting in the middle and the colour going from red to orange to green as it
         climbs; below, the filmstrip of the page loading and the three metrics with their bars. Over a ring the lower
         half turns into the detail: the three things to fix. Run again does the whole audit again -->
    <section class="report" data-report aria-label="Audit report for nordline.shop">
      <header class="report__head">
        <div class="report__where">
          <span class="report__tool">Kestrel Audit</span>
          <span class="report__url">
            <svg class="report__lock" viewBox="0 0 12 12" aria-hidden="true"><rect x="2.5" y="5.2" width="7" height="5" rx="1.3"/><path d="M4.2 5.2V3.9a1.8 1.8 0 0 1 3.6 0v1.3"/></svg>
            nordline.shop/checkout
          </span>
        </div>
        <button class="run" type="button" data-run>
          <span class="run__bg" data-run-bg aria-hidden="true"></span>
          <span class="run__face">
            <svg class="run__icon" viewBox="0 0 16 16" aria-hidden="true">
              <path class="run__again" data-again d="M12.6 6.2A5 5 0 1 0 13 9.6M12.9 2.9v3.5H9.4"/>
              <circle class="run__spin" data-spin cx="8" cy="8" r="5" pathLength="100"/>
            </svg>
            <span class="run__words" data-run-words>Run again</span>
          </span>
        </button>
      </header>

      <div class="rings" data-rings>
        <button class="ring" type="button" data-ring="0" aria-describedby="detail">
          <span class="ring__dial">
            <svg viewBox="0 0 64 64" aria-hidden="true">
              <circle class="ring__disc" cx="32" cy="32" r="27"/>
              <circle class="ring__track" cx="32" cy="32" r="27"/>
              <circle class="ring__glow" cx="32" cy="32" r="27" pathLength="100"/>
              <circle class="ring__arc" cx="32" cy="32" r="27" pathLength="100"/>
            </svg>
            <span class="ring__num" data-num>0</span>
          </span>
          <span class="ring__name">Performance</span>
        </button>
        <button class="ring" type="button" data-ring="1" aria-describedby="detail">
          <span class="ring__dial">
            <svg viewBox="0 0 64 64" aria-hidden="true">
              <circle class="ring__disc" cx="32" cy="32" r="27"/>
              <circle class="ring__track" cx="32" cy="32" r="27"/>
              <circle class="ring__glow" cx="32" cy="32" r="27" pathLength="100"/>
              <circle class="ring__arc" cx="32" cy="32" r="27" pathLength="100"/>
            </svg>
            <span class="ring__num" data-num>0</span>
          </span>
          <span class="ring__name">Accessibility</span>
        </button>
        <button class="ring" type="button" data-ring="2" aria-describedby="detail">
          <span class="ring__dial">
            <svg viewBox="0 0 64 64" aria-hidden="true">
              <circle class="ring__disc" cx="32" cy="32" r="27"/>
              <circle class="ring__track" cx="32" cy="32" r="27"/>
              <circle class="ring__glow" cx="32" cy="32" r="27" pathLength="100"/>
              <circle class="ring__arc" cx="32" cy="32" r="27" pathLength="100"/>
            </svg>
            <span class="ring__num" data-num>0</span>
          </span>
          <span class="ring__name">Best practices</span>
        </button>
        <button class="ring" type="button" data-ring="3" aria-describedby="detail">
          <span class="ring__dial">
            <svg viewBox="0 0 64 64" aria-hidden="true">
              <circle class="ring__disc" cx="32" cy="32" r="27"/>
              <circle class="ring__track" cx="32" cy="32" r="27"/>
              <circle class="ring__glow" cx="32" cy="32" r="27" pathLength="100"/>
              <circle class="ring__arc" cx="32" cy="32" r="27" pathLength="100"/>
            </svg>
            <span class="ring__num" data-num>0</span>
          </span>
          <span class="ring__name">SEO</span>
        </button>
      </div>

      <div class="lower" data-lower>
        <!-- the page load: the filmstrip and the three metrics -->
        <div class="load" data-load>
          <div class="load__head">
            <span>Page load</span>
            <span class="load__total" data-total>0.0 s</span>
          </div>
          <div class="strip" data-strip></div>
          <div class="metrics">
            <div class="metric" data-metric="0">
              <span class="metric__name">LCP <span class="metric__long">Largest paint</span></span>
              <span class="metric__bar"><span class="metric__zones" aria-hidden="true"><i></i><i></i><i></i></span><span class="metric__fill" data-fill></span></span>
              <span class="metric__val" data-val>0.0 s</span>
            </div>
            <div class="metric" data-metric="1">
              <span class="metric__name">CLS <span class="metric__long">Layout shift</span></span>
              <span class="metric__bar"><span class="metric__zones" aria-hidden="true"><i></i><i></i><i></i></span><span class="metric__fill" data-fill></span></span>
              <span class="metric__val" data-val>0.00</span>
            </div>
            <div class="metric" data-metric="2">
              <span class="metric__name">TBT <span class="metric__long">Blocking time</span></span>
              <span class="metric__bar"><span class="metric__zones" aria-hidden="true"><i></i><i></i><i></i></span><span class="metric__fill" data-fill></span></span>
              <span class="metric__val" data-val>0 ms</span>
            </div>
          </div>
        </div>

        <!-- the detail of one ring: the three things to fix -->
        <div class="detail" id="detail" data-detail role="region" aria-live="polite">
          <span class="detail__notch" data-notch aria-hidden="true"></span>
          <div class="detail__head">
            <span class="detail__title" data-d-title>Performance</span>
            <span class="detail__count">3 to fix</span>
          </div>
          <ul class="detail__list" data-d-list></ul>
        </div>
      </div>
    </section>
  </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

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 “Performance score rings” 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 near black page, in the middle, the dark panel of the report with a thin edge catching the light at the top and a veil of grain. At the top the name of the tool, Kestrel Audit, below it the address nordline.shop/checkout with the padlock, and on the right the light «Run again» pill. The panel rises a few pixels and settles; the button turns into «Auditing» with a spinning arc, and the four rings fill one after the other: the arc starts from the top, goes a point and a half past its score and comes back, the number in the middle counts and makes a small elastic hop at the end, and the colour of the arc, the number and the disc behind slides from red to orange to green as it climbs (Performance stops at orange, 68; the others reach green). Meanwhile, below, the page loads in the filmstrip: six thumbnails of abstract shapes, the top bar, the heading, the empty box of the image, the full image, the text and the button, each with its time, while a playhead of light runs over them; the frame of the largest paint takes a green edge with a small bounce, and the total time counts. From halfway through the load the three metrics LCP, CLS and TBT fill their bars over the three zones (good, needs work, poor) in the colour of the zone they reach. Over a ring the others dim, the load fades away and the detail opens in its place with the notch under the ring: the three things to fix, each with where it is and what it saves, and a small bar that grows. Over another ring the notch slides on a spring and the rows swap; moving away brings the load back. «Run again» swells with a bounce and widens its words on hover, squeezes when pressed, drains the rings, the frames and the bars and does it all again with slightly different numbers. Left alone it opens Performance, then SEO, closes and audits again.

How it works

A ring is a circle with pathLength 100

Each ring is an SVG circle with pathLength="100", turned by minus 90 degrees so it starts at the top: stroke-dasharray «68 100» then draws exactly 68 per cent, at any size. Under it the grey track, over it a thicker blurred copy of the arc at 22 per cent as a halo, and behind a disc in the same colour at 8 per cent. At zero the arc hides, because the round cap would leave a dot.

The value that climbs and goes too far

An object { v } goes with GSAP to the score plus OVERSHOOT in 0.8 of RING_TIME on power3.out, then back to the score on a sine. On every update paint() writes the dasharray, and the number in the middle shows the rounded value but never past the score: the arc overshoots by a point and a half, the number does not. When it settles the number hops a pixel and a half and comes back on an elastic.

The colour going from red to green

The colours come from the --poor, --fair and --good variables in :root. A scale of steps, red up to 45, orange from 55 to 86, green from 92, with gsap.utils.interpolate between one step and the next, gives the colour of every value; it goes into --c on the ring, and arc, halo, disc and number all read it from there.

The filmstrip

Six SVG thumbnails of 56 by 40 with preserveAspectRatio slice: each shape has the frame it first shows up in, and in each frame only the new shapes come in, with a small stagger. A one pixel line of light crosses the strip in FRAMES_TIME with left in per cent, the total counts along, and the frame with the full image, the largest paint, takes the green edge with a bounce.

The metrics over the three zones

Under each bar sit the three zones, good, needs work and poor, as wide as the real thresholds (LCP 2.5 and 4 s out of 6, CLS 0.1 and 0.25 out of 0.4, TBT 200 and 600 ms out of 1000), laid out in a grid with --z. The fill is a scaleX that goes a hair too far and settles, in the colour of the zone it reaches, and the value counts with it.

The detail taking the place of the load

Load and detail live in the same grid cell, so the card never changes height. Over a ring the load fades and blurs, the detail rises with back.out and the rows come in staggered with their small bars growing. If it is already open, the notch moves to the new ring with an elastic on the --nx variable and the panel leans two pixels the way it goes; the position is worked out again on resize.

Run again and the walk on its own

The pill swells on an elastic and widens its words with the wdth axis of Mona Sans on hover, and squeezes when pressed. run() drains everything in 0.6 s and builds a new timeline with the numbers of the next audit; a second, repeating timeline walks through the report on its own and stops as soon as the pointer moves, starting again four seconds after it is left.

Values to change

NameFileDefaultWhat it changes
RING_TIMEscript.js1.5Seconds a ring takes to fill to its score.
RING_STAGGERscript.js0.36Seconds between one ring and the next.
OVERSHOOTscript.js1.6Points the arc goes past its score before it settles back.
FRAMES_TIMEscript.js2.6Seconds the filmstrip takes to load, frame after frame.
OPEN_TIMEscript.js0.5Seconds the detail takes to open under a ring.
SPEEDscript.js12 = the whole report twice as fast, 0.5 = half.
LOOPscript.jstrueLeft alone, it opens the rings and runs the audit again and again.

Try them in the Playground

When to use it

For the page of a developer tool, a hosting service or an agency that sells fast websites, for the dashboard of an app that monitors sites, for a landing page that shows a product’s scores or for a case study about a rebuilt site. When scores out of a hundred should read in a second, through colour, with the detail left for whoever hovers.

On phones

The same animation with adapted sizes: the rings and the frames are sized on the height too, the long names of the metrics go and the short ones stay. A tap on a ring opens its detail, a second tap closes it.

With reduced motion

The rings, the numbers, the frames and the bars appear already at their value with a fade, without counting or overshooting; the detail opens and closes with a fade and the notch goes straight to its ring.

Pitfalls

  • Without pathLength the dasharray is in units of the circle (2πr) and changes with the size: with pathLength="100" the score is written as it is.
  • With stroke-linecap round an arc at zero leaves a dot at the top: below half a point the arc hides.
  • The counting number has to stop at the score even while the arc goes past it: a 69 going back to 68 reads as a mistake.
  • Load and detail go in the same grid cell: with one element replacing the other the card would jump in height at every hover.
  • The notch position is in measured pixels: it has to be worked out again on resize, even with the detail open.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 11 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 animations