Skip to content
animorio
IT
Back to the library

Workout rings summary

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

The summary card of tonight's session in Forgeline, a made-up gym app, on a near black page: three concentric SVG rings (ember burn, gold train, lilac active hours) close one after the other with a streak of light at their head and a small chevron riding on it, while the kilocalories count in the middle. When a ring closes it swells on a spring, a glow blooms under it, a thin wave leaves its edge and a light runs one more lap around it; past the goal the arc goes on over itself with a soft shadow under its head. Hover a ring or its figure and the other two step back while the middle reads the detail.

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>
<!--
  "Workout rings summary" 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 workout summary with the rings that close</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>
    <span class="aura" data-aura aria-hidden="true"></span>
    <!-- the summary of tonight's session in Forgeline, a made-up gym app: three concentric rings (move, exercise,
         stand) close one after the other with a streak of light at their head; when one closes it glows and a light
         runs one more lap around it. Hover a ring or its figure below to read it in the middle -->
    <article class="sum" data-card>
      <header class="sum__head">
        <span class="sum__brand">
          <svg class="sum__mark" viewBox="0 0 20 20" aria-hidden="true">
            <path d="M4 15.5V4.5h9M4 10h6.5" />
            <path class="sum__mark-arc" d="M12.4 15.6a5.2 5.2 0 0 0 3.6-5" />
          </svg>
          Forgeline
        </span>
        <span class="sum__day">Mon, Nov 9</span>
      </header>

      <div class="sum__title">
        <div>
          <h1 class="sum__name">Evening strength</h1>
          <p class="sum__meta">52 min, 9 exercises, Studio B</p>
        </div>
        <span class="sum__chip" data-chip>
          <svg viewBox="0 0 12 12" aria-hidden="true"><path data-chip-check pathLength="1" d="M2.6 6.3l2.2 2.2 4.6-4.9" /></svg>
          <span>Closed</span>
        </span>
      </div>

      <div class="rings" data-rings>
        <svg class="rings__svg" viewBox="0 0 240 240" data-svg role="img" aria-label="Burn 486 of 420 kilocalories, train 38 of 30 minutes, active 12 of 12 hours">
          <defs>
            <filter id="blur" x="-30%" y="-30%" width="160%" height="160%"><feGaussianBlur stdDeviation="6" /></filter>
            <filter id="cap" x="-200%" y="-200%" width="500%" height="500%">
              <feDropShadow dx="0" dy="0" stdDeviation="2.4" flood-color="#000" flood-opacity="0.75" />
            </filter>
          </defs>
          <g class="rings__turn" transform="rotate(-90 120 120)" data-turn></g>
        </svg>
        <div class="rings__mid" aria-hidden="true">
          <span class="rings__label" data-mid-label>Burn</span>
          <span class="rings__value" data-mid-value>0</span>
          <span class="rings__unit" data-mid-unit>of 420 kcal</span>
        </div>
      </div>

      <ul class="stats" data-stats>
        <li class="stat" data-stat="0"><span class="stat__name">Burn</span><span class="stat__num"><b data-num>0</b><i>/420 kcal</i></span></li>
        <li class="stat" data-stat="1"><span class="stat__name">Train</span><span class="stat__num"><b data-num>0</b><i>/30 min</i></span></li>
        <li class="stat" data-stat="2"><span class="stat__name">Active</span><span class="stat__num"><b data-num>0</b><i>/12 hr</i></span></li>
      </ul>
    </article>

    <svg class="hand" data-hand viewBox="0 0 24 24" aria-hidden="true">
      <path d="M5.5 3.2l12.6 9.1-5.6.9 3.2 6.1-2.6 1.3-3.1-6.1-4.5 3.6z" />
    </svg>
    <p class="sr" aria-live="polite" data-live></p>
  </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.

34 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 “Workout rings summary” 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 with fine grain and a soft aura in the colour of the ring being read, a dark card in the middle with edges that catch the light from above: the Forgeline mark (an F with a ember arc) and the date at the top, then «Evening strength», «52 min, 9 exercises, Studio B», and below the three concentric rings with their dim tracks. The outer ring, Burn, starts from twelve o'clock and runs clockwise: a streak of white light runs at the head of the arc, a small dark chevron rides on it and in the middle the kilocalories count up to 486 of 420. When the ring closes it swells a hair and comes back on a spring, a blurred glow blooms under it, a thin wave leaves its edge and a light runs one more lap around it; the arc goes on and passes over its own start with a soft shadow under its head, like a ribbon laid on top. Then Train (38 of 30 minutes) and Active (12 of 12 hours) do the same, the figures under the rings count, and the Closed pill comes in at the top right with its check drawing itself. Under the pointer the card leans a little; on a ring or its figure the other two step back, the chosen one grows a hair, the middle shows its name, its figure and how far past the goal it went, and the aura takes its colour. Left alone, a drawn pointer reads the three rings, then they unwind and close again.

How it works

One ring, three circles

Each ring is an SVG group turned by −90 degrees so the stroke starts at twelve: the dim track at 16%, the arc with a stroke-dasharray as long as progress times circumference, and a second arc for the part past 100%, drawn on top. Progress is a number on the ring's object and GSAP takes it from 0 to the result; every frame one render rewrites the attributes.

The streak at the head

Eighteen white circles with mix-blend-mode plus-lighter and a dash an eighteenth of the streak (20% of the lap), each moved with stroke-dashoffset behind the head. The dash period is exactly the circumference, so the modulo still works past one lap. Opacity falls towards the tail and is tied to how fast progress moves, so the light is only there while the ring runs.

The ribbon laid over

Past the goal the head passes over the start: under the top arc a circle as wide as the stroke, with a dark feDropShadow, sits at the head. The shadow only falls on the ring below and the overlap reads as a ribbon. The small chevron is a path turned to the tangent.

When it closes

The render watches progress cross 0.999 going up and starts the celebration: a glow (the same arc wider, with feGaussianBlur) rising in 0.16 s and falling in 1.2, a 3.5% swell coming back on elastic.out, a wave leaving the edge 13 units wide, and one more lap of light 24% of the circumference long with a sine opacity.

The detail on hover

From the pointer the distance to the centre is measured in drawing units and the ring with the nearest radius is chosen. The others ease to 28%, the chosen one grows a hair, the middle changes with a small rise, and the figures use tabular digits so they do not wobble while counting.

Values to change

NameFileDefaultWhat it changes
FILL_TIMEscript.js1.9Seconds each ring takes to fill.
STAGGERscript.js1.2Seconds between one ring starting and the next.
TRAILscript.js1How bright the streak at the head of the arc is (0 turns it off).
GLOWscript.js1How strong the bloom is when a ring closes.
EXTRA_LAPscript.jstrueA light runs one more lap around a ring as it closes.
TILTscript.js5How many degrees the card leans towards the pointer.
THICKNESSscript.js18The width of each ring, in units of a 240 wide drawing.
SPEEDscript.js1Speed of the walk on its own: 2 twice as fast, 0.5 half.
LOOPscript.jstrueReads the rings and closes them again and again.

Try them in the Playground

When to use it

For the summary of a session in a gym, running or yoga app, the results page of a course, a health widget in a dashboard, or the landing of an app that wants to show three goals met at a glance. It suits anywhere three figures against three targets should celebrate when they pass them.

On phones

The same animation with adapted sizes: the card takes almost the full width and the rings are sized on width and height, so everything fits the box. Tap a ring or its figure to read the detail; after a moment the walk starts again.

With reduced motion

No movement: the rings are already closed, the card and the pill fade in, no streak, glow, waves or tilt; the detail in the middle changes with a fade and there is no drawn pointer.

Pitfalls

  • An arc's dash must be written as «length circumference+2», not one number: with a single value SVG repeats the dash and the ring looks broken.
  • With stroke-linecap round a zero length arc is still a dot: under 0.2% the arc has to be hidden with opacity.
  • The progress tweens of the walk must be fromTo: if the walk is interrupted and the ring filled by hand, a to() not yet started would record the full value as its start and stop moving on later laps.
  • Never overwrite: true on hand made tweens on the same objects as the walk's timeline: it would also kill the paused timeline's tweens.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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