
The inchworm menu
Menus, Hover, Transitions
The pace calculator of Stride, a made-up running app, alone in the middle on white. Pick the race among 5K, 10K, Half and Marathon with the white indicator sliding over the pills, drag the target time on a slider with ticks, and the digits of the time, the pace per kilometre and per mile roll on reels like an odometer. The effort zone (Easy, Steady, Tempo, Race) lights up in bars, and below the split times at the checkpoints are worked out again along the orange line of the race. Switch race and the pace stays while the time is recomputed. Save plan folds into “Plan saved” with a check that draws itself.
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>
<!--
"Running pace calculator" 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>Running pace calculator</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 pace calculator of a made-up running app: pick the race, drag the target time,
and the pace per kilometre, the zone and the split times roll to the new numbers -->
<section class="calc" data-calc aria-label="Pace calculator">
<header class="calc__head">
<span class="calc__title">
<svg class="calc__icon" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="13.5" r="7.25"></circle>
<path d="M10 3.25h4M12 3.25v3"></path>
<path class="calc__hand" data-hand d="M12 13.5V9.25"></path>
<path d="M18.2 6.6l1.3-1.3"></path>
</svg>
<span>Pace calculator</span>
</span>
<span class="calc__brand">Stride</span>
</header>
<div class="races" role="radiogroup" aria-label="Race distance" data-races>
<span class="races__pill" data-pill aria-hidden="true"></span>
<button class="race" type="button" role="radio" aria-checked="false" data-race="0">5K</button>
<button class="race" type="button" role="radio" aria-checked="false" data-race="1">10K</button>
<button class="race" type="button" role="radio" aria-checked="false" data-race="2">Half</button>
<button class="race" type="button" role="radio" aria-checked="true" data-race="3">Marathon</button>
</div>
<div class="goal">
<span class="goal__label">Target time</span>
<span class="goal__time roll" data-time aria-hidden="true"></span>
</div>
<div class="slider" data-track>
<div class="slider__rail" aria-hidden="true">
<span class="slider__fill" data-fill></span>
</div>
<div class="slider__ticks" data-ticks aria-hidden="true"></div>
<div class="slider__handle" data-handle role="slider" tabindex="0" aria-label="Target time" aria-valuemin="0" aria-valuemax="0" aria-valuenow="0" aria-valuetext="">
<span class="slider__halo" data-halo></span>
<span class="slider__knob" data-knob><span class="slider__grip"></span></span>
</div>
<div class="slider__ends" aria-hidden="true"><span data-lo></span><span data-hi></span></div>
</div>
<div class="pace">
<div class="pace__main">
<span class="pace__label">Pace</span>
<span class="pace__value"><span class="roll" data-pace aria-hidden="true"></span><span class="pace__unit">/km</span></span>
</div>
<div class="pace__side">
<span class="zone" data-zone><span class="zone__bar"><i></i><i></i><i></i><i></i></span><span class="zone__name" data-zonename>Steady</span></span>
<span class="pace__mile"><span class="roll roll--small" data-mile aria-hidden="true"></span><span>/mi</span></span>
</div>
<span class="sr" data-live aria-live="polite"></span>
</div>
<div class="splits" data-splits aria-label="Split times">
<div class="splits__rail" aria-hidden="true"><span class="splits__fill" data-splitfill></span></div>
</div>
<button class="save" type="button" data-save data-autoclic>
<span class="save__bg" data-savebg></span>
<span class="save__txt" data-savetxt>Save plan</span>
<span class="save__done" data-savedone aria-hidden="true">
<svg viewBox="0 0 16 16"><path data-check pathLength="1" d="M3.5 8.4l2.9 2.8 6.1-6.4"></path></svg>
<span>Plan saved</span>
</span>
</button>
</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>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.
28 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Running pace calculator” from Animorio and fit it into my siteEach digit is a 0 to 9 column inside a window one line tall, moved by yPercent at -10 per digit; the colons stay put. The digits roll right to left, STAGGER seconds apart, with a back.out that goes a little past. If the shape of the number changes (from 59:30 to 1:00:00) the reels are rebuilt and come in from below.
When you switch race the script takes the current pace (time over distance), multiplies it by the new distance and rounds it to that race’s slider step: 15 seconds for the 5K, 30 for the 10K, one minute for the half and the marathon. Then the handle glides on a spring to its new spot on the track.
The white pill is not inside the buttons: it is a single element under them that GSAP moves to the position and width of the chosen button, with back.out(1.25), while squashing its height on an elastic. Arrow keys step from race to race.
For each checkpoint the time is the target time times its share of the race, at an even pace. The points sit at their real distance along the line, kept inside the card at the edges, and are placed again on every resize.
The check has pathLength 1 and draws itself by taking strokeDashoffset from 1 to 0; that is why autoRound is turned off at the top, otherwise GSAP would round to whole pixels and the check would appear all at once.
| Name | File | Default | What it changes |
|---|---|---|---|
RACE | script.js | Marathon | The race picked at the start: 5K, 10K, Half or Marathon. |
GOAL | script.js | 3:29:00 | The target time at the start, for the chosen race (hours:minutes:seconds or minutes:seconds). |
ROLL | script.js | 0.6 | How long the numbers take to roll to the new value, in seconds. |
BOUNCE | script.js | 1.5 | How far the numbers and the handle overshoot before settling (0 = no bounce). |
STAGGER | script.js | 0.035 | The delay between one digit and the next as they roll, in seconds. |
SAVED_FOR | script.js | 1.8 | How long “Plan saved” stays before going back to “Save plan”, in seconds. |
LOOP_PAUSE | script.js | 1.6 | The pause at the end of the self-running loop before it starts again, in seconds. |
In the app or website of a running club, a city marathon, a running shoe shop or a coach: to pick a target time and see straight away the pace to hold and the checkpoint splits. The same pattern works for any calculator where one slider changes several numbers at once.
The card takes at most the width minus 24 pixels, and the gaps between its parts and the size of the time are measured on the height too (vh), so it all fits the phone preview box. The slider drags with a finger without scrolling the page, the pills are tapped, and the checkpoints stay inside the card at the edges.
No springs and no reels: the numbers change at once, the pill and the handle jump to their place without gliding, the zone changes its name without a hop, “Plan saved” appears with the check already drawn and the self-running loop does not start.
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.
Tested on 24 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.
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.