
Speeding marquee
Scroll, Text, Hover
The log of drives for work, in a card on warm white: the week’s drives, each to tag “Business” or “Personal”, and at the top an odometer with four windows that adds up only the business ones, turning digit by digit like a real one, with a green tenths wheel. Beside it the deduction counts in dollars. With each choice a small chip says how many miles come in or go out, the strip on the drive’s left takes its colour and at the bottom you read how many are still to tag. Minimal style.
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>
<!--
"Mileage log" 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>Mileage log</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">
<!-- a mileage log: the week's drives to tag Business or Personal, an odometer for the business total that
turns digit by digit, and the deduction counting along -->
<section class="ml" data-ml aria-label="Mileage log">
<header class="ml__head">
<div class="ml__what">
<span class="ml__label">Business miles, this week</span>
<div class="ml__odo" data-odo aria-hidden="true"></div>
<span class="ml__sr" data-outsr>18.4 miles</span>
</div>
<div class="ml__ded">
<span class="ml__label">Deduction</span>
<strong data-outded>$12.33</strong>
<span class="ml__rate" data-outrate>at $0.67 a mile</span>
</div>
<span class="ml__plus" data-plus aria-hidden="true">+6.2</span>
</header>
<ul class="ml__list">
<li class="ml__trip" data-trip data-mi="18.4" data-tag="b"><div class="ml__info"><strong>Home to client</strong><span>Mon 08:10</span></div><b class="ml__mi">18.4 mi</b><div class="ml__seg" role="group" aria-label="Home to client"><i data-thumb></i><button type="button" data-b>Business</button><button type="button" data-p>Personal</button></div></li>
<li class="ml__trip" data-trip data-mi="6.2" data-tag=""><div class="ml__info"><strong>Office to printer</strong><span>Tue 14:35</span></div><b class="ml__mi">6.2 mi</b><div class="ml__seg" role="group" aria-label="Office to printer"><i data-thumb></i><button type="button" data-b>Business</button><button type="button" data-p>Personal</button></div></li>
<li class="ml__trip" data-trip data-mi="31.6" data-tag=""><div class="ml__info"><strong>Home to airport</strong><span>Wed 09:05</span></div><b class="ml__mi">31.6 mi</b><div class="ml__seg" role="group" aria-label="Home to airport"><i data-thumb></i><button type="button" data-b>Business</button><button type="button" data-p>Personal</button></div></li>
<li class="ml__trip" data-trip data-mi="4.8" data-tag="p"><div class="ml__info"><strong>Office to gym</strong><span>Thu 18:20</span></div><b class="ml__mi">4.8 mi</b><div class="ml__seg" role="group" aria-label="Office to gym"><i data-thumb></i><button type="button" data-b>Business</button><button type="button" data-p>Personal</button></div></li>
</ul>
<p class="ml__foot"><span class="ml__clip"><span data-outleft>2 drives still need a tag</span></span></p>
</section>
<span class="live" aria-live="polite" data-live></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
36 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 “Mileage log” from Animorio and fit it into my siteEvery drive has its miles and a tag: the total is the sum of the business ones, worked out again at every tap. Nothing is added or taken away by hand.
GSAP animates one number from the old total to the new one; at every frame that number becomes the position of the four wheels and the deduction.
The tenths wheel follows the number continuously. Each wheel to the left rests on its digit and only advances during the last tenth of a turn of the one on its right.
Plus or minus comes from the difference between the total before and after, so it is right even when a tag is removed.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #1f8a5b | The colour of business drives: the strip, the miles, the deduction. |
RATE | script.js | 0.67 | What a business mile is worth, in dollars. |
SPIN | script.js | 0.9 | How many seconds the odometer takes to turn. |
LOOP | script.js | true | Left alone, the demo’s pointer tags the drives one by one. |
In a freelancer’s or a company’s expense app, in an expense report, a fleet tool or the page presenting a mileage reimbursement app; the same counter with rows to tag carries billable hours, deductible expenses, a week’s steps or the kilos of a harvest.
The card is at most 356 pixels wide and about 330 tall. Under 350 pixels the windows and the control’s two options narrow; long drive names are cut with an ellipsis. The control’s options are 20 pixels tall inside a 24-pixel pill.
The odometer and the deduction show the new total at once, without turning; pills and texts change in one step and the difference chip does not appear. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.0 KB; the libraries: GSAP 28 KB.
Tested on 2 December 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.