Skip to content
animorio
IT
Back to the library

Live runner tracker

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

Live tracking of a marathon, minimal style: Ines Arda’s bib pinned at four corners, the race clock running, and below it the line of checkpoints (Start, 10K, Half, 30K, 40K, Finish) filling with blue as she runs. At each checkpoint the tick lights up with a small knock, the split rolls into place, the average pace and the projected finish adjust; a dashed ghost runs at the goal pace. At the finish a ring closes the line and the bib gives a little hop. Hover a checkpoint to read its 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>
<!--
  "Live runner tracker" 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>Live runner tracker</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 live tracking card of a made-up city marathon: the runner's bib, a line of checkpoints that fills as she
         runs, the split at each checkpoint rolling in, the average pace and the projected finish adjusting, and the
         finish closing with a ring. Hover or tap a checkpoint to read its detail. -->
    <section class="card" data-card aria-labelledby="titolo">
      <span class="card__sheen" aria-hidden="true"></span>

      <header class="head">
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M3 15.5c3-6.5 6.4-9.5 14-11" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round"/><path d="M12.6 3.9 17 4.5l-1.3 4.2" fill="none" stroke="currentColor" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"/></svg>
          <span id="titolo">Lakeshore Marathon</span>
        </span>
        <span class="state"><span class="roll" aria-hidden="true"><span class="roll__row" data-state>Live</span></span></span>
      </header>

      <div class="top">
        <div class="bib" data-bib aria-label="Bib 2184, Ines Arda, wave B">
          <span class="bib__pin bib__pin--a" aria-hidden="true"></span>
          <span class="bib__pin bib__pin--b" aria-hidden="true"></span>
          <span class="bib__pin bib__pin--c" aria-hidden="true"></span>
          <span class="bib__pin bib__pin--d" aria-hidden="true"></span>
          <span class="bib__band" aria-hidden="true">Lakeshore 42.2</span>
          <span class="bib__num" aria-hidden="true">2184</span>
          <span class="bib__name" aria-hidden="true">Ines Arda</span>
          <span class="bib__wave" aria-hidden="true">Wave B · 8:45</span>
        </div>

        <dl class="stats">
          <div class="stat">
            <dt>Race time</dt>
            <dd class="stat__big" data-clock>0:00:00</dd>
          </div>
          <div class="stat">
            <dt>Avg pace</dt>
            <dd><span class="roll" aria-hidden="true"><span class="roll__row" data-pace>– /km</span></span></dd>
          </div>
          <div class="stat">
            <dt>Projected finish</dt>
            <dd><span class="roll" aria-hidden="true"><span class="roll__row" data-proj>3:30:00</span></span><span class="delta"><span class="roll" aria-hidden="true"><span class="roll__row" data-delta>Goal 3:30:00</span></span></span></dd>
          </div>
        </dl>
      </div>
      <p class="sr" data-sr aria-live="polite"></p>

      <div class="line" data-line>
        <div class="line__track" aria-hidden="true"><span class="line__fill" data-fill></span></div>
        <span class="ghost" data-ghost aria-hidden="true"><span class="ghost__dot"></span></span>
        <span class="runner" data-runner aria-hidden="true"><span class="runner__dot"></span></span>
        <div class="tip" data-tip aria-hidden="true">
          <span class="tip__k" data-tip-k>10K</span>
          <span class="tip__v" data-tip-v>49:52</span>
          <span class="tip__s" data-tip-s>4:59 /km · 1,204th</span>
        </div>
        <ol class="cps" data-cps></ol>
      </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.

31 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Live runner tracker” 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 warm paper, the white card of the Lakeshore Marathon, a made-up race. On the left Ines Arda’s bib, 2184, wave B at 8:45, a slightly crooked sheet with a blue band and four shiny pins. On the right the race clock running big, the average pace and the projected finish with the gap to the three and a half hour goal. Below, the line of six checkpoints like a subway line: blue fills it, the runner’s dot moves on and a dashed dot runs at the goal pace. At each checkpoint the tick turns blue with an elastic knock and the split rolls in under its name; pace and projected finish roll to their new values. At the finish «Live» turns into «Finished», a ring draws itself around the last tick, the bib hops and the finish detail opens. Then the race starts again.

How it works

Real time, schematic line

Each checkpoint has its distance and its split. A single variable, the race time, goes from zero to 3:32:16 in RACE seconds with ease none; the position on the line comes from the stretch between two checkpoints, so the checkpoints sit evenly like the stops on a subway map.

The passes

The timeline puts a call at the exact moment of each pass: the tick takes its colour, grows to POP and comes back with elastic.out, and the split, the average pace and the projected finish roll in windows one line tall.

The ghost

The dashed dot runs at the goal pace (TARGET minutes): its distance is the race time divided by the goal time, mapped through the same stretches between checkpoints.

The detail

Each checkpoint is a button as wide as its column: hover, tap or Tab opens the dark box with the split, the pace and the place, or the expected time if she has not passed yet; the box stays inside the card and its arrow always points at the tick.

The finish

The last tick’s ring draws itself with strokeDashoffset on a circle with pathLength 1 (autoRound off), the bib rises 5 pixels and springs back, «Live» rolls into «Finished».

Values to change

NameFileDefaultWhat it changes
RACEscript.js13How many seconds the whole marathon lasts in the demo.
FINISH_HOLDscript.js3.6How long the finish stays before the race starts again, in seconds.
POPscript.js1.7How much a tick grows when the runner passes it.
ROLLscript.js0.5The seconds a number takes to roll to its new value.
TIP_HOLDscript.js0How long the detail stays open by itself after each checkpoint, in seconds (0 = only on hover, tap and at the finish).
TARGETscript.js210The runner’s goal, in minutes: it drives the ghost and the gap.
TILTscript.js-2The tilt of the bib, in degrees.

Try them in the Playground

When to use it

On the page of a marathon, a half or a trail race to follow a friend live, in the app of a city run, in a training app showing a past race, or in any stage-by-stage progress with real times (a shipment, a flight with stops, a delivery).

On phones

Everything is sized in em and the text size follows the window’s width and height together: the card fits whole in the box and the six checkpoints stay in a row. The detail opens and closes on tap.

With reduced motion

The line still fills, because it is the data; no knocks on the ticks and no rolling lines: numbers change with a fade, the bib does not hop and the ring appears already closed.

Pitfalls

  • The ring’s circle has pathLength 1: without autoRound off GSAP rounds strokeDashoffset to 0 or 1 and the ring pops in instead of drawing.
  • The rolling rows must be cleared at every restart: otherwise each loop leaves one more row in the window.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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