
Long shadow letters
Text, Scroll, 3D
Scroll inside the preview
A chapter page for a made-up real estate developer, Veyra: the stage stays still and six chapters go by as you scroll. The capital title lights up letter by letter in random order, the text rises line by line and the bevelled glass button enters with two trails of light running round its edge. On the left the index of the chapters, written in scrambling letters, with the thin bar of the open one flickering and staying lit.
Rebuilt from scratch studying hubtown.co.in by Unseen Studio: 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>
<!--
"Randomly lit 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="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Veyra, builders since 1994</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/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- a made-up real estate developer, Veyra. The stage stays still while you scroll through six chapters: each title
lights up letter by letter in random order, the text rises line by line and the bevelled button enters with two
trails of light running round its edge. On the left the index of the chapters, rewritten letter by letter -->
<main class="corsa" data-corsa>
<div class="palco" data-palco>
<svg class="orizzonte" data-orizzonte aria-hidden="true"></svg>
<header class="testa">
<a class="marchio" href="#" aria-label="Veyra">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M2 3h4l4 10 4-10h4L11.6 18H8.4z"/></svg>
<span>Veyra</span>
</a>
<nav class="testa__voci" aria-label="Main">
<a href="#">Projects</a><a href="#">Studio</a><a href="#">Journal</a><a href="#">Contact</a>
</nav>
</header>
<nav class="indice" data-indice aria-label="Chapters"></nav>
<div class="contenuto" data-contenuto aria-live="polite">
<p class="etichetta" data-etichetta></p>
<h1 class="titolo" data-titolo></h1>
<p class="testo" data-testo></p>
<div class="azione" data-azione>
<a class="smussato" href="#" data-smussato>
<svg class="smussato__bordo" data-bordo aria-hidden="true">
<path class="smussato__base" data-base/>
<path class="smussato__alone" data-alone/>
<path class="smussato__scia" data-scia/>
</svg>
<span class="smussato__lampo" data-lampo></span>
<svg class="smussato__icona" viewBox="0 0 12 12" aria-hidden="true">
<rect x="1" y="1" width="2" height="10"/><rect x="5" y="3" width="2" height="8"/><rect x="9" y="5" width="2" height="6"/>
</svg>
<span class="smussato__testo" data-cta></span>
</a>
</div>
</div>
<footer class="piede">
<span class="piede__scorri">
<svg viewBox="0 0 10 14" aria-hidden="true"><path d="M5 1v11M1.5 8.5 5 12l3.5-3.5"/></svg>
Scroll to explore
</span>
<span class="piede__ora">Now reading <b data-ora></b></span>
</footer>
</div>
</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/gsap@3.15.0/dist/SplitText.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/ScrambleTextPlugin.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/CustomEase.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.
18 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 “Randomly lit chapters” from Animorio and fit it into my siteThe run is six times CHAPTER_SCROLL plus one screen tall, and the stage inside is sticky. A single ScrollTrigger splits the progress into six parts: when the part changes, the old block leaves and the new one enters, so they cross like on the original, where each chapter has its own ScrollTrigger with onEnter and onLeave.
SplitText splits the title into letters and the text into lines. The letters go from autoAlpha 0 to 1 in 0.4 seconds with stagger amount STAGGER and from "random"; the lines rise by 2.5rem with stagger 0.2; the easing is the original’s curve, CustomEase "M0,0 C0.2,0 0.1,1 1,1".
The bar of the open chapter runs an autoAlpha tween an eighth of a second long, as a yoyo, repeated until it has blinked FLICKERS times, and then stays lit. The index names are written with ScrambleTextPlugin in capitals (chars "upperCase"), 0.05 seconds apart.
The button’s edge is a path computed from its size, with two corners cut by BEVEL pixels and two slightly rounded, starting from the top centre. On top sits the same path with a single dash repeated every half perimeter: two trails, always opposite. In one second, with power2.inOut, the strokeDashoffset moves half a perimeter and the dash length is TRAIL_LENGTH times sin(π·p).
An SVG with twenty-six rays from the vanishing point and sixteen horizontal rows placed at depth z to the power of 2.2, so they bunch up towards the horizon. Every frame the rows move a little; at each chapter GSAP takes the vanishing point, the horizon height, the spread of the rays and the glow to their new values.
| Name | File | Default | What it changes |
|---|---|---|---|
STAGGER | script.js | 1.1 | How many seconds the letters of a title take to all light up, in random order. |
FLICKERS | script.js | 8 | How many times the bar of the open chapter flickers before it stays lit. |
TRAIL_LENGTH | script.js | 50 | How long the two trails of light on the button get at most (in pixels). |
BEVEL | script.js | 20 | How big the cut corners of the button are (in pixels). |
LERP | script.js | 0.08 | How soft the scroll is: lower is softer. |
CHAPTER_SCROLL | script.js | 85 | How much you scroll for each chapter, in screen heights (100 = one screen). |
For the home page of a real estate developer, an architecture studio or anyone who tells their work in a few principles: each chapter is one big sentence, one line and one action, and the side index always tells you where you are.
The same animation with adapted sizes: as on the original the side index disappears and the chapter name becomes the label above the title; the chapter sits bottom left and the title is sized on the height too, so everything fits on screen. The button runs its trails again on tap.
No smooth scroll, no random letters and no flicker: each chapter fades in and out whole, the index names are already written and the horizon stays still.
GSAP 3.15.0, ScrollTrigger 3.15.0, SplitText 3.15.0, ScrambleTextPlugin 3.15.0, CustomEase 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.0 KB; the libraries: GSAP + ScrollTrigger + SplitText + CustomEase + ScrambleText 56 KB, Lenis 5.3 KB.
Tested on 25 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.
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.