Skip to content
animorio
IT
Back to the library

Spa thermal circuit

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

The guide to a spa’s thermal circuit, to keep on your phone: three stages, sauna, cold plunge and rest. A ring counts the time of the stage you are in, the degrees count to its temperature and the whole card takes its colour: the amber of the sauna, the blue of the cold water, the green of the rest. When a stage ends the ring gives a kick and the next one starts.

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>
<!--
  "Spa thermal circuit" 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>Spa thermal circuit with ring timers and a colour that goes from hot to cold</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 thermal circuit of a spa, as a guide on the guest's phone: three stages (sauna, cold plunge, rest); a
         ring counts the time of the stage you are in, the degrees count to its temperature and the whole card takes
         its colour, from the amber of the sauna to the blue of the cold water to the green of the rest; when a stage
         ends the ring closes with a kick and the next one starts; tapping a stage takes you there -->
    <section class="card" data-card data-stage="0" aria-label="Thermal circuit">
      <span class="card__air" aria-hidden="true"></span>
      <header class="head">
        <div>
          <p class="head__place">Alba Spa</p>
          <h1 class="head__title">Thermal circuit</h1>
        </div>
        <p class="deg"><span data-deg>85</span><small>°C</small></p>
      </header>

      <div class="ring" data-ring-box>
        <svg viewBox="0 0 160 160" aria-hidden="true">
          <circle class="ring__track" cx="80" cy="80" r="66"></circle>
          <circle class="ring__arc" data-ring cx="80" cy="80" r="66" pathLength="1"></circle>
          <g class="ring__ticks" data-ticks></g>
        </svg>
        <div class="ring__read">
          <p class="ring__name"><span data-name>Sauna</span></p>
          <p class="ring__time" data-time>12:00</p>
          <p class="ring__what"><span data-what>Dry heat, sit high</span></p>
        </div>
      </div>

      <div class="stops" role="group" aria-label="Stages">
        <button class="stop" type="button" data-stop><span class="stop__name">Sauna</span><span class="stop__meta">12 min</span><span class="stop__bar"><i data-bar></i></span></button>
        <button class="stop" type="button" data-stop><span class="stop__name">Cold plunge</span><span class="stop__meta">2 min</span><span class="stop__bar"><i data-bar></i></span></button>
        <button class="stop" type="button" data-stop><span class="stop__name">Rest</span><span class="stop__meta">15 min</span><span class="stop__bar"><i data-bar></i></span></button>
      </div>
    </section>
    <p class="sr" data-live aria-live="polite"></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.

24 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 “Spa thermal circuit” 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

In the middle, on black, a dark card with a coloured air rising from behind: the spa’s name, ‘Thermal circuit’ and on the right the degrees. In the centre a ring with sixty small ticks round it: inside, the stage’s name, the time left in large type and a tip in small. Below, three tiles: Sauna, 12 minutes; Cold plunge, 2 minutes; Rest, 15 minutes, each with a thin line. It starts with the sauna: everything is amber, the degrees say 85, the ring fills while the time goes down from 12:00 and the first tile’s line advances. When the ring is full it gives an elastic kick; a moment later the card turns blue, the degrees count down to 12, the name and the tip roll to ‘Cold plunge’ and ‘Slow, deep breaths’, the second tile lights up with a small bounce and the ring starts again. Then the rest, green, at 24 degrees. The stages already done keep their line full, slightly dimmed. Tapping a tile restarts the circuit from there. Left alone, the circuit runs and starts over.

How it works

One colour per stage

The card has data-stage: in the CSS this changes a single variable, --tone, and the ring, the degrees, the stage’s name and the background air follow it with a transition.

The ring and the time

A number from 0 to 1 says how much of the stage has gone: it is the ring’s stroke-dashoffset, the scale of the line in the tile and, multiplied by the stage’s minutes, the time left. In the demo each stage lasts EACH seconds, whatever its real length.

The degrees that count

At the start of each stage a tween takes the degrees from the previous value to the new one in nine tenths of a second: from 85 to 12 you see them go down.

The handover

When a stage ends the ring scales to KICK and returns with elastic.out; after GAP seconds a call in the timeline resets the number and the next stage comes in.

The ticks

The sixty ticks round the ring are a single SVG path written by the script with sine and cosine, with a longer tick every five.

Values to change

NameFileDefaultWhat it changes
EACHscript.js3.4How many seconds each stage lasts in the demo.
GAPscript.js0.9The pause between one stage and the next, in seconds.
KICKscript.js1.08How much the ring grows when a stage ends (1 = not at all).
HOTscript.js#ff8a3dThe colour of the sauna.
COLDscript.js#57c7ffThe colour of the cold plunge.
RESTscript.js#8fd6a0The colour of the rest.
LOOPscript.jstrueLeft alone, the circuit runs and starts over.

Try them in the Playground

When to use it

For the app or page of a spa, a hotel with a wellness centre, a gym with a sauna: the guide that takes the guest from one stage to the next. With other names it suits any timed sequence: interval training, a recipe, a morning routine.

On phones

The same card, as wide as the screen: the ring is sized on the height too, so on a short screen it shrinks and the three tiles stay inside.

With reduced motion

The ring does not fill slowly: each stage appears already complete, with its degrees and colour, and after a few seconds the next one comes without kicks.

Pitfalls

  • Hot and cold are not told by colour alone: there are the degrees in writing and the stage’s name.
  • The ring starts at the top because the SVG is rotated by minus 90 degrees in the CSS: the end-of-stage kick sits on the container, not on the SVG, or the rotation would be lost.
  • Times and temperatures here are an example: the real ones are set by the spa, and a guide like this must say to stop if you do not feel well.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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