
Melting words
Text, Scroll, SVG
Scroll inside the preview
A page in chapters with a pinned panel that changes colour as you scroll and writes each chapter’s mark with a brush, while beside it the moments scroll by, the drawings slightly slower than the text.
Rebuilt from scratch studying champohaircare.com by BAO: the idea is theirs; code, copy and images are ours. Read how it’s made
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>
<!--
"The colour chapters" 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>I capitoli di colore</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>
<header class="apertura">
<h1 class="apertura__titolo">Una giornata all’orto</h1>
<p class="apertura__testo">Dall’alba alla notte, un colore per ogni ora. Scorri: il pannello cambia colore e ogni capitolo si scrive col pennello.</p>
</header>
<!-- al telefono il pannello diventa una barra in alto col colore del capitolo -->
<div class="barra" data-barra aria-hidden="true">
<svg class="barra__segno" data-barra-segno viewBox="0 0 200 200" focusable="false"></svg>
<span class="barra__nome" data-barra-nome>Alba</span>
</div>
<main class="giornata" data-giornata>
<div class="giornata__momenti">
<section class="capitolo capitolo--alba" data-capitolo="alba" aria-label="Alba">
<h2 class="capitolo__titolo">Alba</h2>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="cesta" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">6:10</span> La cesta delle zucchine, ancora bagnate.</figcaption>
</figure>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="annaffiatoio" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">6:45</span> Un giro d’acqua alle lattughe.</figcaption>
</figure>
</section>
<section class="capitolo capitolo--mezzogiorno" data-capitolo="mezzogiorno" aria-label="Mezzogiorno">
<h2 class="capitolo__titolo">Mezzogiorno</h2>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="cappello" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">12:20</span> Il cappello resta appeso al cancello.</figcaption>
</figure>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="brocca" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">13:00</span> Acqua, limone e un bicchiere solo.</figcaption>
</figure>
</section>
<section class="capitolo capitolo--tramonto" data-capitolo="tramonto" aria-label="Tramonto">
<h2 class="capitolo__titolo">Tramonto</h2>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="pomodori" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">19:10</span> Il rosso più rosso della giornata.</figcaption>
</figure>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="carriola" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">19:40</span> La carriola torna vuota al capanno.</figcaption>
</figure>
</section>
<section class="capitolo capitolo--notte" data-capitolo="notte" aria-label="Notte">
<h2 class="capitolo__titolo">Notte</h2>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="lanterna" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">22:30</span> Una lanterna sul muretto.</figcaption>
</figure>
<figure class="momento" data-momento>
<div class="momento__quadro"><svg class="momento__disegno" data-disegno="cane" viewBox="0 0 200 150" aria-hidden="true" focusable="false"></svg></div>
<figcaption class="momento__testo" data-testo><span class="momento__ora">23:50</span> Il cane dorme sul portico.</figcaption>
</figure>
</section>
</div>
<aside class="pannello" data-pannello aria-hidden="true">
<div class="pannello__dentro">
<svg class="pannello__segno" data-segno viewBox="0 0 200 200" focusable="false"></svg>
<div class="pannello__voce" data-voce="alba">
<p class="pannello__nome">Alba</p>
<p class="pannello__frase">Si raccoglie prima del caldo.</p>
</div>
<div class="pannello__voce" data-voce="mezzogiorno">
<p class="pannello__nome">Mezzogiorno</p>
<p class="pannello__frase">L’ombra del fico è l’unica stanza fresca.</p>
</div>
<div class="pannello__voce" data-voce="tramonto">
<p class="pannello__nome">Tramonto</p>
<p class="pannello__frase">I pomodori prendono l’ultimo sole.</p>
</div>
<div class="pannello__voce" data-voce="notte">
<p class="pannello__nome">Notte</p>
<p class="pannello__frase">L’orto beve la guazza.</p>
</div>
</div>
</aside>
</main>
<footer class="chiusura">
<p class="chiusura__testo">Domani si ricomincia, un po’ prima del sole.</p>
</footer>
<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.
59 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 “The colour chapters” from Animorio and fit it into my siteThe page is a two-column grid and the panel is the right-hand element, with position: sticky, top 0, a height equal to the screen and align-self: start. It stays still while the column of moments scrolls beside it, with no spacer and no recalculation.
Each mark is a calligraphic outline uncovered by a mask, a wide line with pathLength 1. To write it the stroke-dashoffset goes from 1.02 to 0; to erase it, it does not go back but carries on to −1.02: the visible stroke slides past the end of the line, and the mark disappears from its start, like a trace drying.
Each chapter has its own timeline of length 1, tied to scrolling from when its top passes 70% of the screen to when its bottom does: between 0 and 0.3 it writes the mark, at 0.06 it brings in the text, between 0.8 and 1 it erases both. The colour instead changes in a separate tween, while the chapter’s top goes from 72% to 38% of the screen.
Inside each frame the drawing is enlarged 1.2 times and moves from yPercent 9 to −9 while the moment crosses the screen; the caption below moves about twenty pixels the other way. On phones the panel disappears and in its place a fixed bar slides down with the colour, the small mark and the chapter name, which changes with a small jump.
| Name | File | Default | What it changes |
|---|---|---|---|
CAPITOLI | script.js | 4 capitoli | For each chapter: name, panel colour, text colour and mark (a line in 200 × 200 and the brush width). |
DISEGNI | script.js | 8 disegni | The moments’ drawings, in SVG 200 × 150: they can be replaced by photographs in the same frame. |
min-height del capitolo | style.css | 150% dello schermo | How long a chapter lasts: taller, more scrolling for each colour. |
To tell a day, a process, the seasons or a product’s lines, when each step has its own colour and a mark to remember.
A single column; the panel gives way to a fixed bar at the top that slides down when the chapters begin and changes colour, mark and name at every chapter.
The marks are not written and the drawings do not scroll at different speeds: at every chapter the panel changes colour, mark and text with a two-tenths fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.5 KB; the libraries: GSAP + ScrollTrigger 45 KB.
Tested on 27 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.