
Speeding marquee
Scroll, Text, Hover
Live timing at a kart track, on black: the lap time runs large and gains weight, three sectors fill and take their colour when done, the gap to the best lap updates at every sector. The finished lap drops into the list; hover it to read it again.
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 lap times" 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>Lap times</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">
<!-- live lap timing at a kart track: the lap time runs and gains weight, three sectors fill and take
their colour, the gap to the best lap follows; finished laps drop into the list, hover one to read it -->
<section class="lt" data-lt aria-label="Lap times">
<header class="lt__head">
<span>Circuito Alba, kart 14</span>
<span class="lt__lap"><span class="lt__roll"><span data-lap>Lap 6</span></span></span>
</header>
<div class="lt__clock">
<b class="lt__time" data-time>0:00.000</b>
<span class="lt__gap"><span class="lt__roll"><span data-gap></span></span></span>
</div>
<div class="lt__sectors" data-sectors aria-hidden="true"></div>
<div class="lt__list" data-list role="list" aria-label="Finished laps"></div>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></path></svg>
</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.
14 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 “Live lap times” from Animorio and fit it into my siteThe lap time is a number advancing on GSAP’s ticker, multiplied by SPEED. The digits, the font weight and the fill of the three sectors all come from that number, each taking its share.
Each digit sits in a cell of one width: the 1 is narrow and the 0 is wide, and without cells the number would dance at every thousandth. No tabular-nums, which gives Mona Sans a slashed zero.
While a sector is running its bar is neutral and shows the time to beat. The colour comes only when the sector is closed, compared with the all-time best and with the lap before.
| Name | File | Default | What it changes |
|---|---|---|---|
BEST | script.js | #b892ff | The colour of the best sector or lap. |
UP | script.js | #3ddc84 | The colour of a sector faster than the lap before. |
DOWN | script.js | #ffb020 | The colour of a slower sector. |
SPEED | script.js | 9 | How many times faster than real the demo’s stopwatch runs. |
PAUSE | script.js | 0.9 | The seconds the lap time stands still on the line. |
SPREAD | script.js | 0.35 | By how many seconds at most a sector changes from lap to lap. |
LOOP | script.js | true | Left alone, a pointer moves over the finished laps. |
On the site or app of a kart track, a circuit or a race, on the pit screen, on a motorsport event page; and wherever a time is read live against a reference: a swimming race, a run, a project’s build.
The same scene: the number is also sized on the window’s height and the laps in the list are tapped to read them again.
The stopwatch runs in real time, not sped up, and the digits change in place. Laps, colours and labels change without bounces or slides.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.2 KB; the libraries: GSAP 28 KB.
Tested on 19 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.