
Long shadow letters
Text, Scroll, 3D
Scroll inside the preview
The post of a made-up personal travel blog, Slow Platform, in the premium style of the interface pieces: four days by train from Zurich to Milano. The stage holds still and the scroll is the journey: through the window the landscape (a real photo) slides by, a small red train runs along the line printed on the pass, and at every station the conductor punches it: the paper gives under the punch and springs back, a red ring draws itself, the hole bites through with a pixel of overshoot and the little disc of paper drops away tumbling. Meanwhile the diary turns to the next day and the kilometres count up.
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>
<!--
"Train journey pass" 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>Slow Platform, four trains to Milano</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- a post of a made-up personal travel blog, Slow Platform: four days by train from Zurich to Milano. The stage
sticks while you scroll and the scroll is the journey: the view through the window slides by, a small train
runs along the line of the rail pass, and at every station the conductor punches the pass (the paper gives,
a hole bites through, the little disc of paper drops away) while the diary turns to the next day. -->
<main>
<section class="trip" data-trip>
<div class="stage" data-stage>
<div class="grain" aria-hidden="true"></div>
<article class="post" data-post>
<span class="post__edge" aria-hidden="true"></span>
<figure class="window" data-window>
<div class="window__glass">
<img class="window__view" data-view src="finestrino.webp" alt="Green meadows and a rocky peak seen from the train" width="960" height="640">
<span class="window__shine" data-shine aria-hidden="true"></span>
</div>
<figcaption class="window__cap">
<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="3" y="2.2" width="10" height="11.6" rx="2.6"/><path d="M3 9h10"/></svg>
<span>From the window seat</span>
</figcaption>
</figure>
<div class="body">
<header class="blog">
<span class="blog__mark" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M5 2.5 3 17.5M15 2.5l2 15"/><path d="M4.6 6h10.8M4.1 10h11.8M3.6 14h12.8"/></svg>
</span>
<span class="blog__name">Slow Platform</span>
<span class="blog__meta">Rail notes · 6 min read</span>
</header>
<h1 class="title">Four trains to Milano</h1>
<div class="entry" data-entry aria-live="polite">
<p class="entry__kick" data-kick>Mon 9 Nov · Zürich</p>
<h2 class="entry__head" data-head>Packing light for the slow way down</h2>
<p class="entry__text" data-text>One bag, one pass, four trains. The plan is to see the Alps at the speed of a window seat.</p>
</div>
<div class="pass" data-pass>
<div class="pass__paper" data-paper>
<span class="pass__grain" aria-hidden="true"></span>
<div class="pass__top">
<span class="pass__brand">Alpine Rail Pass</span>
<span class="pass__valid">Valid 9–13 Nov · 2nd class</span>
</div>
<div class="line" data-line aria-hidden="true">
<span class="line__base"></span>
<span class="line__fill" data-fill></span>
<span class="line__tick" style="--at:0"></span>
<span class="line__tick" style="--at:.25"></span>
<span class="line__tick" style="--at:.5"></span>
<span class="line__tick" style="--at:.75"></span>
<span class="line__tick" style="--at:1"></span>
<span class="line__train" data-train><i></i></span>
</div>
<ol class="legs">
<li class="leg" data-leg>
<span class="leg__day">Tue 10</span>
<span class="leg__route">ZUR<svg viewBox="0 0 12 8" aria-hidden="true"><path d="M1 4h9M7.4 1.4 10 4 7.4 6.6"/></svg>CHU</span>
<span class="leg__km">117 km</span>
<span class="punch" data-punch aria-hidden="true">
<svg class="punch__ring" viewBox="0 0 20 20"><circle data-ring cx="10" cy="10" r="8.2" pathLength="1"/></svg>
<span class="punch__hole" data-hole></span>
</span>
</li>
<li class="leg" data-leg>
<span class="leg__day">Wed 11</span>
<span class="leg__route">CHU<svg viewBox="0 0 12 8" aria-hidden="true"><path d="M1 4h9M7.4 1.4 10 4 7.4 6.6"/></svg>SMZ</span>
<span class="leg__km">89 km</span>
<span class="punch" data-punch aria-hidden="true">
<svg class="punch__ring" viewBox="0 0 20 20"><circle data-ring cx="10" cy="10" r="8.2" pathLength="1"/></svg>
<span class="punch__hole" data-hole></span>
</span>
</li>
<li class="leg" data-leg>
<span class="leg__day">Thu 12</span>
<span class="leg__route">SMZ<svg viewBox="0 0 12 8" aria-hidden="true"><path d="M1 4h9M7.4 1.4 10 4 7.4 6.6"/></svg>TIR</span>
<span class="leg__km">61 km</span>
<span class="punch" data-punch aria-hidden="true">
<svg class="punch__ring" viewBox="0 0 20 20"><circle data-ring cx="10" cy="10" r="8.2" pathLength="1"/></svg>
<span class="punch__hole" data-hole></span>
</span>
</li>
<li class="leg" data-leg>
<span class="leg__day">Fri 13</span>
<span class="leg__route">TIR<svg viewBox="0 0 12 8" aria-hidden="true"><path d="M1 4h9M7.4 1.4 10 4 7.4 6.6"/></svg>MIL</span>
<span class="leg__km">150 km</span>
<span class="punch" data-punch aria-hidden="true">
<svg class="punch__ring" viewBox="0 0 20 20"><circle data-ring cx="10" cy="10" r="8.2" pathLength="1"/></svg>
<span class="punch__hole" data-hole></span>
</span>
</li>
</ol>
</div>
</div>
<footer class="tally">
<span class="tally__item"><small>Travelled</small><b><span data-km>0</span> km</b></span>
<span class="tally__item"><small>On board</small><b data-time>0h 00m</b></span>
<span class="tally__item tally__item--end"><small>Now at</small><b data-at>Zürich</b></span>
</footer>
</div>
</article>
</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.
45 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 “Train journey pass” from Animorio and fit it into my siteThe section is four screens tall and the stage inside is sticky and 100vh tall (100lvh on Safari). A single scrubbed ScrollTrigger drives a paused timeline that takes a number from 0 to 1: from it come the red line and the train (two CSS variables in percent, no pixels to work out again), the landscape in the window (xPercent of a photo wider than the glass) and the stations, which fire when the number passes the ticks at a quarter, half, three quarters and the end.
When a station fires: the SVG ring with pathLength="1" goes from strokeDashoffset 1 to 0; the hole (a circle the colour of the card with an inner shadow) goes to scale 1.14 in 0.11 s and back to 1 with back.out; the pass drops 1.6 px turning a fifth of a degree toward the blow and comes back with elastic.out. The disc of paper is born over the hole but outside the paper, on the wrapper, because the paper has a mask (the notches) that would clip it: it falls, drifts, squashes in scaleY back and forth as if it were tumbling and fades.
The two notches are two transparent half circles in two radial-gradients of a mask, each over one half of the pass, at the height of the perforation. The mask clips the shadow too: that is why the shadow is a drop-shadow on the wrapper, which follows the shape with its notches.
| Name | File | Default | What it changes |
|---|---|---|---|
RIDE | script.js | 1 | How much scroll the whole journey takes: 2 is twice as long. |
PRESS | script.js | 1.6 | How many pixels the pass gives under the punch before it springs back. |
BITE | script.js | 1.14 | How far the hole passes its size before it settles (1 for none). |
DROP | script.js | 34 | How many pixels the disc of paper falls. |
PAN | script.js | 1 | How far the landscape slides in the window: 0 it stays still. |
RING | script.js | 1 | 1: a red ring draws around every hole; 0: just the hole. |
--accent | style.css | #c63d2f | The rail red: the line, the train, the ring and the diary date. |
--ticket | style.css | #f5eedf | The ivory of the pass paper. |
--page | style.css | #ece6db | The warm white of the ground. |
For the story of a trip on a personal blog, for the page of a rail itinerary of an agency or a tour operator, or for the story of a journey in stages: whoever scrolls follows the trip day by day and watches the pass fill with holes, the proof that the journey was made.
The same animation with adapted measures: the window becomes a strip on top, sized in vh, and the card, the diary and the pass are sized on width and height together so everything fits the box; the scrolling finger makes the journey and a tap on a leg rides to that station.
No movement: the landscape stays still, the train and the line jump to the station, the holes fade in with no blow and no disc, the ring is already drawn and the diary changes with a fade.
GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, Fraunces (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.8 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 16 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.