
Melting words
Text, Scroll, SVG
Scroll inside the preview
A scroll animation for the product page of a sustainable label: the carbon footprint of a recycled wool jacket, 12.4 kg CO2e, which breaks as you scroll into a bar split in five parts (materials, manufacturing, transport, packaging, end of life), each with its own row and a value that rolls in. Then the industry average arrives, a longer, fainter bar, and the saving lights up in moss green.
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>
<!--
"Carbon footprint" 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>Carbon footprint</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>
<!-- the product page of a made-up sustainable label: the stage stays still while you scroll and the jacket's
carbon footprint breaks into its parts, then meets the industry average -->
<section class="storia" data-storia>
<div class="palco">
<article class="card" data-card>
<header class="card__head" data-entra>
<p class="marca">Loamline</p>
<p class="prodotto"><span class="prodotto__nome">Fell Jacket</span><span class="prodotto__mat">Recycled wool</span></p>
</header>
<div class="totale">
<p class="etichetta" data-entra>Carbon footprint, per jacket</p>
<p class="cifra" data-cifra>
<span class="num num--grande" data-num="total" data-int="2" data-dec="1"></span>
<span class="unita">kg CO<sub>2</sub>e</span>
</p>
<p class="badge" data-badge>
<span class="badge__face">
<svg viewBox="0 0 12 12" aria-hidden="true"><path d="M6 2.2v7.2M2.9 6.5L6 9.6l3.1-3.1"/></svg>
<span><span class="num" data-num="pct-saved" data-int="2" data-dec="0"></span>% below average</span>
</span>
</p>
</div>
<div class="grafico" data-grafico>
<svg class="barre" data-svg aria-hidden="true">
<defs>
<pattern id="tratteggio" width="5" height="5" patternUnits="userSpaceOnUse" patternTransform="rotate(45)">
<rect width="5" height="5" class="tratteggio__fondo"/>
<line x1="0" y1="0" x2="0" y2="5" class="tratteggio__riga"/>
</pattern>
</defs>
<rect class="media__fondo" data-media-fondo/>
<rect class="risparmio__area" data-risparmio fill="url(#tratteggio)"/>
<path class="media__bordo" data-media-bordo pathLength="1"/>
<g data-parti-svg></g>
<path class="media__riga" data-media-riga pathLength="1"/>
<path class="nostra__riga" data-nostra-riga pathLength="1"/>
</svg>
<div class="tip" data-tip role="tooltip">
<p class="tip__nome" data-tip-nome></p>
<p class="tip__valore" data-tip-valore></p>
<p class="tip__nota" data-tip-nota></p>
</div>
</div>
<ul class="parti" data-parti>
<li class="parte" data-parte><span class="parte__nome">Materials</span><span class="parte__pista"><span class="parte__pieno" data-pieno></span></span><span class="parte__kg"><span class="num" data-num="p0" data-int="1" data-dec="1"></span> kg</span></li>
<li class="parte" data-parte><span class="parte__nome">Manufacturing</span><span class="parte__pista"><span class="parte__pieno" data-pieno></span></span><span class="parte__kg"><span class="num" data-num="p1" data-int="1" data-dec="1"></span> kg</span></li>
<li class="parte" data-parte><span class="parte__nome">Transport</span><span class="parte__pista"><span class="parte__pieno" data-pieno></span></span><span class="parte__kg"><span class="num" data-num="p2" data-int="1" data-dec="1"></span> kg</span></li>
<li class="parte" data-parte><span class="parte__nome">Packaging</span><span class="parte__pista"><span class="parte__pieno" data-pieno></span></span><span class="parte__kg"><span class="num" data-num="p3" data-int="1" data-dec="1"></span> kg</span></li>
<li class="parte" data-parte><span class="parte__nome">End of life</span><span class="parte__pista"><span class="parte__pieno" data-pieno></span></span><span class="parte__kg"><span class="num" data-num="p4" data-int="1" data-dec="1"></span> kg</span></li>
</ul>
<footer class="confronto" data-confronto>
<p class="confronto__media"><span>Industry average</span><span class="confronto__kg"><span class="num" data-num="avg" data-int="2" data-dec="1"></span> kg</span></p>
<p class="confronto__salvo" data-salvo><span>You save</span><span class="confronto__kg"><span class="num" data-num="saved" data-int="1" data-dec="1"></span> kg</span></p>
</footer>
</article>
<p class="cenno" data-cenno>
Scroll to break it down
<svg viewBox="0 0 12 16" aria-hidden="true"><path d="M6 2v11M2 9.2L6 13.2l4-4"/></svg>
</p>
</div>
</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="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.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.
49 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 “Carbon footprint” from Animorio and fit it into my siteThe section is SCROLL_LENGTH screens tall and holds a sticky stage 100lvh tall with the card in the middle. A paused GSAP timeline moves a few numbers (how far each part has split, how lit it is, the comparison, the saving) and a ScrollTrigger tween with scrub plays it back and forth.
A ticker turns those numbers into SVG: each part is a path with round corners only where there is already a gap, so while the bar is whole no notches show. The gap between parts follows an elastic.out tied to the scroll: it passes the mark and comes back.
Each number is made of columns holding the digits 0 to 9: the decimal column turns continuously, the others click over only when the one below goes from 9 to 0, like an odometer. The value chases its target on a spring integrated by hand, so it passes the mark by a hair and settles.
The bar shrinks to 12.4 out of 21.8 while the average's outline draws itself with pathLength and stroke-dashoffset; then the line at the average's end, the green hatching (an SVG pattern) filling the difference and the saving pill on a spring.
The pointer over the bar or over a row looks for the part under it: the others dim, it lifts on a small spring and the tooltip glides above it with gsap.quickTo, kept inside the card.
| Name | File | Default | What it changes |
|---|---|---|---|
SCROLL_LENGTH | script.js | 5 | How many screens of scrolling the whole story takes: more is slower. |
MATERIALS | script.js | 5.2 | The kg CO2e of the materials. |
MANUFACTURING | script.js | 3.6 | The kg CO2e of manufacturing. |
TRANSPORT | script.js | 1.9 | The kg CO2e of transport. |
PACKAGING | script.js | 0.6 | The kg CO2e of packaging. |
END_OF_LIFE | script.js | 1.1 | The kg CO2e of end of life. |
AVERAGE | script.js | 21.8 | The industry average, the longer bar. |
GAP | script.js | 5 | The gap between the parts once they split, in pixels. |
SPRING | script.js | 0.45 | How much the parts spring as they split: lower wobbles more. |
ROLL_STIFFNESS | script.js | 210 | The spring of the rolling digits: higher is quicker. |
ROLL_DAMPING | script.js | 21 | Lower lets the digits pass the mark and come back. |
For the product page of a sustainable fashion or design label, a sustainability report, an app that measures emissions, or any figure to break into its parts and set against an average.
The same animation with adapted sizes: the card takes almost the whole width, the number and the spaces are measured on the height too, and the tooltip opens by tapping a part or a row.
No springs, no rolling digits, no smooth scrolling: at each step the card dims and comes back with the step already done, the part split, the value in place, and at the end the average and the saving.
GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 17 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.