
Long shadow letters
Text, Scroll, 3D
The figures of a made-up app, Murrow, in the clean style of interface pieces: three large figures count up and, when they pass a thousand or a million, the unit changes with a small show. The extra digits squeeze and slide away, the point drops into place, the K or the M arrives narrow and widens, lit blue for a moment, and the figure goes one pixel past its place and settles.
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>
<!--
"Unit-changing counter" 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 counter with numbers that grow and change units</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>
<!-- the numbers of a made-up team chat app, Murrow: three figures count up, and when one passes a thousand or a
million its unit changes with a small show, the extra digits squeeze and slide away, the decimal point drops
into place and the K or the M arrives narrow and widens -->
<section class="stats" aria-label="Murrow in numbers" data-frame>
<p class="eyebrow"><span class="mark" aria-hidden="true"><svg viewBox="0 0 20 20"><path d="M3.5 5.5a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H9l-3.6 3v-3H5.5a2 2 0 0 1-2-2z"/></svg></span><span data-brand>Murrow</span> <span class="eyebrow__soft">in numbers</span></p>
<h1 class="title">Built by teams like yours</h1>
<div class="grid">
<div class="stat" data-stat="0">
<p class="stat__label">Teams</p>
<p class="num" data-num aria-live="off"></p>
<span class="rule" aria-hidden="true"><span class="rule__fill" data-rule></span></span>
<p class="stat__note" data-note>since launch</p>
</div>
<div class="stat" data-stat="1">
<p class="stat__label">Messages sent</p>
<p class="num" data-num aria-live="off"></p>
<span class="rule" aria-hidden="true"><span class="rule__fill" data-rule></span></span>
<p class="stat__note" data-note>this month</p>
</div>
<div class="stat" data-stat="2">
<p class="stat__label">Hours saved</p>
<p class="num" data-num aria-live="off"></p>
<span class="rule" aria-hidden="true"><span class="rule__fill" data-rule></span></span>
<p class="stat__note" data-note>by fewer meetings</p>
</div>
</div>
<button class="replay" type="button" data-replay data-autoclic>
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4.5 10a5.5 5.5 0 1 0 1.7-4"/><path d="M4 3.5v3.2h3.2"/></svg>
<span>Replay</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.
24 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 “Unit-changing counter” from Animorio and fit it into my siteEach figure is a row of spans, one per character, each with its font-variation-settings tied to two CSS variables, --w for the width and --g for the weight. GSAP animates the variables directly, so every digit can squeeze, widen or get heavier on its own.
While the figure counts, a tween on an object takes the value to its goal and every update writes the new text. Only the digits that changed roll: the old one goes up by its whole height inside the cell with overflow hidden, the new one arrives from below in sixteen hundredths.
At the threshold the old cells, from the last to the first, go to zero width while --w drops to 62 and the opacity to zero. The new ones start at zero width and grow to the size measured beforehand; the digits rise with back.out, the point drops from above on a stronger spring and the K or the M goes from --w 75 to 118 and back to 100 with elastic.out, its accent colour fading into black.
The weight depends on the unit, plus WEIGHT_STEP at each jump, and a little on the value inside the unit; in the change it arrives forty points heavier and settles. The whole row goes up one pixel and comes back with an elastic.
The line under each figure grows on a logarithmic scale, so both the small and the large steps show. A single timeline lines up the steps of the three figures, offset by thirty-five hundredths; at the end Replay appears and the loop starts again.
| Name | File | Default | What it changes |
|---|---|---|---|
BRAND | script.js | "Murrow" | The name of the made-up app, written above the headline. |
COUNT | script.js | 1.4 | The seconds a figure takes to count to the next step. |
MORPH | script.js | 0.75 | The seconds of the change of unit. |
WEIGHT_STEP | script.js | 110 | How much weight the digits gain with each larger unit. |
OVERSHOOT | script.js | 1 | The pixels the figure goes past its place before settling. |
HOLD | script.js | 2.6 | The seconds the finished figures stay before the loop starts again. |
For the stats section of a landing page, a report or an app: three figures that count up and, instead of growing long, change unit the way they are really written, 1.2K and 3.4M.
The same animation with adapted sizes: under 560 pixels the three figures become rows, with the name and the note on the left and the figure on the right, and the size of the digits follows the width and the height.
No counting and no rolling: the finished figures appear at once with a fade, with full lines.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.8 KB; the libraries: GSAP 28 KB.
Tested on 27 October 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.