
Long shadow letters
Text, Scroll, 3D
Scroll inside the preview
The classic counter, except the number also grows in width: from narrow and nervous to full and steady, with a trailing shadow.
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>
<!--
"Widening count-up" 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="it">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Numeri che contano e si allargano</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main>
<section class="intro">
<h1>Qualche numero</h1>
<p>Scorri: i numeri contano e intanto si allargano.</p>
</section>
<!-- data-fino: il numero d'arrivo. Il testo iniziale resta per chi non ha JavaScript -->
<ul class="numeri">
<li><span class="numero" data-fino="128">128</span><span class="cosa">progetti consegnati</span></li>
<li><span class="numero" data-fino="36">36</span><span class="cosa">città dei clienti</span></li>
<li><span class="numero" data-fino="9">9</span><span class="cosa">premi di design</span></li>
<li><span class="numero" data-fino="2014">2014</span><span class="cosa">l'anno del primo sito</span></li>
</ul>
<section class="coda" aria-hidden="true"></section>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrollTrigger.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.
23 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 “Widening count-up” from Animorio and fit it into my siteGSAP does not animate the text of a number: it animates an object { v, w, s } and on every update writes the rounded value, the width and the shadow offset into the DOM.
font-variant-numeric: tabular-nums gives every digit the same width, so the number does not jiggle while counting.
The CSS uses font-stretch: calc(var(--w) * 1%). JavaScript only changes --w: no heavy layout work beyond the text itself.
toggleActions 'play none none reset' restarts the animation when you scroll back above its start. To play it once, use once: true.
| Name | File | Default | What it changes |
|---|---|---|---|
data-fino | index.html | 128, 36, 9, 2014 | The final value of each number. |
DURATA | script.js | 2.2 | Seconds of counting. |
LARGHEZZA | script.js | 75, 104 | Font width at the start and at the end (wdth axis). |
SCIA | script.js | 12 | Maximum shadow offset in pixels. Zero removes it. |
--numero, --scia | style.css | #ff8a3d | Colour of the number and of its shadow. |
For numbers that are real data: years, quantities, results. Not for numbering sections or menu items.
The same. Below 760 pixels the grid switches to two columns.
The numbers are already at their value and final width, with no counting.
GSAP 3.15.0, ScrollTrigger 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 2.2 KB; the libraries: GSAP + ScrollTrigger 45 KB.
Tested on 26 September 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.