
The star rating
Ratings, SVG, Hover
The rest between sets widget of a strength training app, a smoked glass card on a near black page, like a Dribbble shot. Log set logs the set: its capsule fills on a spring, the volume of the day rolls up and the card turns into the rest, with the time rolling in digit by digit and the ticks of the dial lighting up in amber. The time goes down on its reels, the ticks go out with it chased by an arc of light, the heart rate comes down; plus 15 and minus 15 change the rest on a spring, in the last seconds the amber turns lime and at zero the card swells by a hair: your set.
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>
<!--
"Gym rest 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>The gym rest timer with the set that logs itself</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="stage__glow stage__glow--warm" data-glow-warm aria-hidden="true"></span>
<span class="stage__glow stage__glow--go" data-glow-go aria-hidden="true"></span>
<!-- the rest timer widget of a strength training app: a card of smoked glass. On top the exercise and the sets of
it as small capsules; in the middle a dial of thin ticks around the weight of the next set or, while resting,
the time left with digits that roll; under it the heart rate coming down and the volume of the day; at the
bottom minus 15, the main button and plus 15 -->
<article class="rest" data-card aria-label="Rest timer">
<span class="rest__edge" aria-hidden="true"></span>
<span class="rest__grain" aria-hidden="true"></span>
<header class="rest__head">
<div class="rest__titles">
<p class="rest__day" data-day>Push day</p>
<h2 class="rest__ex"><span class="rest__ex-in" data-ex>Bench press</span></h2>
</div>
<div class="rest__sets" data-sets aria-label="Sets"></div>
</header>
<div class="rest__dial" data-dial>
<svg class="rest__glowarc" viewBox="0 0 220 220" aria-hidden="true">
<path data-glowarc pathLength="1" d=""/>
</svg>
<svg class="rest__ticks" viewBox="0 0 220 220" aria-hidden="true">
<g data-ticks-off></g>
<g data-ticks-on></g>
<line class="rest__lead" data-lead x1="110" y1="4" x2="110" y2="22"/>
</svg>
<div class="rest__center">
<p class="rest__label"><span data-label>Your set</span></p>
<div class="rest__big">
<p class="rest__weight" data-weight><span class="rest__kg" data-kg>80</span><span class="rest__unit">kg</span></p>
<p class="rest__time" data-time aria-hidden="true"></p>
</div>
<p class="rest__sub"><span data-sub>8 reps · RPE 8</span></p>
</div>
</div>
<div class="rest__meta">
<span class="rest__stat">
<svg class="rest__heart" data-heart viewBox="0 0 16 16" aria-hidden="true"><path d="M8 13.4S2.2 9.9 2.2 6.1A2.9 2.9 0 0 1 8 4.6a2.9 2.9 0 0 1 5.8 1.5c0 3.8-5.8 7.3-5.8 7.3z"/></svg>
<span class="rest__num" data-hr>128</span><span class="rest__small">bpm</span>
</span>
<span class="rest__stat rest__stat--right">
<span class="rest__small">Volume</span><span class="rest__num" data-vol>1,280</span><span class="rest__small">kg</span>
</span>
</div>
<footer class="rest__actions">
<button class="rest__side" type="button" data-minus aria-label="Take 15 seconds off the rest" disabled>
<span class="rest__side-face" data-face>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8"/></svg>
<span data-step-a>15</span>
</span>
</button>
<button class="rest__main" type="button" data-main data-autoclic>
<span class="rest__main-face" data-face>
<span class="rest__main-shine" data-shine aria-hidden="true"></span>
<svg class="rest__main-icon" viewBox="0 0 16 16" aria-hidden="true">
<path class="rest__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
<path class="rest__skip" data-skip d="M4 4.2L7.8 8 4 11.8M8.6 4.2L12.4 8 8.6 11.8"/>
</svg>
<span class="rest__main-words"><span data-words>Log set</span></span>
</span>
</button>
<button class="rest__side" type="button" data-plus aria-label="Add 15 seconds to the rest" disabled>
<span class="rest__side-face" data-face>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 8h8M8 4v8"/></svg>
<span data-step-b>15</span>
</span>
</button>
</footer>
</article>
<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>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.
39 values to change
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 “Gym rest timer” from Animorio and fit it into my siteThe card has a translucent fill with backdrop-filter: blur and saturate, over two blurred lights of the page (amber and lime) of which GSAP moves only the opacity; the edge is a span with a gradient and the content-box mask in xor, so a one pixel line remains that takes the colour of the moment from the --acc variable, tweened by GSAP as a colour.
The 48 ticks are SVG lines made by the script, rotated over 300 degrees around the centre, in two copies: the grey ones that are off and over them the lit ones in the --acc colour. A value f between 0 and 1 lights the first f×47 ticks, with the boundary tick at half opacity; an arc with pathLength 1 and stroke-dasharray f, blurred by CSS, makes the light under them.
The real time is rem, going down in requestAnimationFrame at SPEED times real; the dial does not follow it at once but on a damped spring (stiffness, friction, step capped at 1/30 s), so at the start of the rest the ticks light up in a row and with plus 15 they climb back with a small overshoot.
Each digit is a reel with the numbers 0 to 9 in a column inside a window 1em tall; every second GSAP brings the column to yPercent −10×digit with a back.out, and only the reels whose digit changes move. A gradient mask fades the top and bottom of the window.
Set and rest swap weight and time in the same grid cell (opacity, y, scale and blur), the words with a small roll; the main button changes from Log set with the check to Skip rest with the two chevrons, minus and plus light up only during the rest. After the last set the next exercise comes in and the capsules empty from the right.
| Name | File | Default | What it changes |
|---|---|---|---|
DAY | script.js | Push day | The workout, over the exercise. |
EXERCISES | script.js | Bench press 80 kg × 8, Incline press 32 kg × 10, Cable fly 18 kg × 12 | The exercises, one after the other, with weight and reps. |
SETS | script.js | 4 | How many sets each exercise has. |
REST | script.js | 60 | The rest between two sets, in seconds. |
STEP | script.js | 15 | The seconds that minus and plus take off or add. |
SPEED | script.js | 6 | How much faster than real the demo time runs (1 = real seconds). |
TICKS | script.js | 48 | How many ticks the dial has. |
SPRING | script.js | 1 | How springy the moves are: 0.4 calm, 2 very bouncy. |
AUTO | script.js | true | The widget trains by itself until someone touches it. |
For a strength training app, a fitness app or a gym dashboard: the rest between sets, but also the rest between the intervals of a run, a break in a class or any countdown that gets longer and shorter with two buttons.
On the phone the card is at most 86% of the screen wide and the dial is sized on both width and height; the buttons are 46 pixels tall, easy for the thumb, and nothing depends on hover.
Nothing moves or swells: weight and time swap with a fade, the digits change in place, the ticks follow the time without a spring and the colours change slowly.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 3 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.