
Words that melt into each other
Text, Scroll, SVG
NewFree
Scroll inside the preview
A whole day over the skyline of a drawn city: as you scroll the sky goes from dawn to night, the sun makes its arc and the moon rises, the shadows turn and lengthen, the windows light up one by one and a big clock counts the hours with rolling digits.
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>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>A day on the scroll</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 class="scena" data-scena>
<div class="palco" data-palco>
<!-- il cielo: tre colori che lo script fonde ora per ora -->
<div class="cielo" data-cielo aria-hidden="true"></div>
<!-- la città: lo script la disegna su misura dello schermo -->
<svg class="citta" data-citta aria-hidden="true" focusable="false"></svg>
<header class="testata">
<p class="marchio">
<svg class="marchio__segno" viewBox="0 0 32 32" aria-hidden="true" focusable="false"><path d="M4 22a12 12 0 0 1 24 0" fill="none" stroke="currentColor" stroke-width="3"/><path d="M2 26h28" stroke="currentColor" stroke-width="3"/><path d="M16 4v4M6.5 8.5l2.8 2.8M25.5 8.5l-2.8 2.8" stroke="currentColor" stroke-width="3"/></svg>
<span>Hotel Solstice</span>
</p>
<a class="prenota" href="#"><span class="prenota__fondo" aria-hidden="true"></span><span class="prenota__testo">Book a night</span></a>
</header>
<section class="racconto">
<p class="orologio" data-orologio aria-live="off"></p>
<div class="momento" data-momento aria-live="polite"></div>
</section>
<p class="cenno" data-cenno>Scroll through the day</p>
</div>
</main>
<!-- i momenti della giornata: l'ora in cui comincia ciascuno, il nome e la riga -->
<ul class="momenti" data-momenti hidden>
<li data-ora="0" data-nome="Dawn">First light over Port Avalon. The rooftop pool opens for early swimmers.</li>
<li data-ora="8.5" data-nome="Morning">Breakfast runs until eleven, with bread from the bakery downstairs.</li>
<li data-ora="11.5" data-nome="Noon">High sun. Every room has blinds that close on their own.</li>
<li data-ora="17.5" data-nome="Sunset">Golden hour at the Terrace Bar. Take the seat by the rail.</li>
<li data-ora="20.5" data-nome="Night">The city switches on, window by window. Your bed is turned down at ten.</li>
</ul>
<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.
41 values to change
With the Animorio connector, Claude Code takes it from here, guide included, and fits it into your project. Paste this request:
Take “A day on the scroll” from Animorio and fit it into my siteA single tween takes one number, the hour, from START_HOUR to END_HOUR while the scene goes from top to bottom (start top top, end bottom bottom, scrub 0.8). Everything else is computed from that number every frame, in one function: the sky, the sun, the shadows, the windows, the clock. Lenis smooths the scrolling and passes each step to ScrollTrigger.update.
The five skies (dawn, morning, noon, sunset, night) are three colours each: top, middle, horizon. Between them there are passages made by mixing the neighbours, and the blend follows a cosine curve, so the change has no jumps. The colours end up in three CSS variables of a linear-gradient; buildings, glass, street and clouds also take their colour from variables computed from the same sky.
The SVG has a viewBox as big as the stage, so one unit is one pixel, and the city is drawn with a seeded random number generator: the same every time. On a phone the buildings are narrower and lower and the sun’s arc sits below the text. It is redrawn only if the width or the height changes a lot, not when Safari’s bar comes and goes.
All the shadows are a single path in a semi-transparent group, so where they overlap they do not get twice as dark. Each shadow starts at the base of its building and falls on the street: its tip moves away from the sun, more the lower the sun is, and gets longer as the sun goes down. The shaded side of each building is a dark rectangle whose opacity depends on where the sun is.
Every window that will light up has its own hour, in a row from dusk; when the hour passes it a scaleY tween with back.out starts, and going back it switches off. The clock digits are boxes with overflow: hidden: the old one leaves upwards, the new one comes in from below with a bounce (the other way when scrolling up). Each moment’s line is split into words that rise in a row.
| Name | File | Default | What it changes |
|---|---|---|---|
START_HOUR, END_HOUR | script.js | 5.5, 23.5 | The hour at the top and at the bottom of the page, in hours and decimals: 5.5 is 5:30. END_HOUR goes up to 24, midnight. |
WINDOWS | script.js | 120 | How many windows light up at dusk, one after another. The others stay dark. |
CLOUDS | script.js | 6 | How many clouds cross the sky; 0 leaves it clear. |
SKY_DAWN, SKY_MORNING, SKY_NOON, SKY_SUNSET, SKY_NIGHT | script.js | #e79ea2, #a3d2f1, #73baee, #df727a, #121a47 | The five skies, three colours each: top, middle, horizon. The passages between them are made on their own. |
--palazzo-a … --palazzo-d, --palazzo-notte | style.css | #d8c7b0, #1a2048 | The front buildings’ daytime colours and the one they fade to at night. |
--luce-calda, --luce-chiara | style.css | #ffd27a, #ffe9b8 | The two colours of the lit windows and the street lamps. |
To tell the passing of time: a hotel or holiday home, a weather or sleep app, a one-day event, a festival schedule, an “our day” page for a studio or a restaurant.
The same day with adapted sizes: narrower, lower buildings, smaller windows, a smaller full-width clock at the top and the sun’s and moon’s arc below the text, so they do not cross it.
Nothing moves continuously: the day goes in steps, one moment at a time (dawn, morning, noon, sunset, night), and each change is a fade. Digits and lines change with a fade, the windows light up by fading in, the clouds stay still and the birds do not flap.
GSAP 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 10 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.
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.