
Long shadow letters
Text, Scroll, 3D
Scroll inside the preview
A minimal scroll text animation with one gesture: the faster the page runs, the wider the word. A single word stays still in the middle while the page runs under it; scroll fast and the letters stretch on the width axis of the type and get thinner, the middle ones first, and when you stop they spring back, a hair too narrow and then right, like a rubber band. The thin rule underneath measures it and turns orange at full speed; press and hold and the word squeezes and gets heavier.
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>
<!--
"Stretching word" 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>The word that stretches when you scroll fast</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>
<!-- a long page: the stage stays put while the page runs under it, and the word takes its width from how fast it runs -->
<main class="corsa" data-run>
<section class="palco" data-stage>
<!-- the hairline ruler at the edge: it is the page going by -->
<div class="righello" data-ruler aria-hidden="true"></div>
<div class="gruppo">
<h1 class="parola" data-word aria-label="Momentum"></h1>
<!-- the thin rule that measures the word, with a tick at each end -->
<div class="misura" data-rule aria-hidden="true">
<span class="linea" data-line></span>
<span class="tacca" data-tick-a></span>
<span class="tacca" data-tick-b></span>
</div>
</div>
<p class="nota" data-note>Scroll fast, then let go</p>
</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/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.
16 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 “Stretching word” from Animorio and fit it into my siteEvery frame of GSAP’s ticker reads scrollY and divides the change by the screen height and the time passed: screens per second. The number is smoothed with a 70 millisecond filter and turned into a stretch between 0 and 1 with one minus an exponential, so a slow scroll widens a little and a fling gets close to the top without going past it.
Every letter has its own spring chasing the stretch, in a few small steps per frame. The middle letters are 40 per cent stiffer than the outer ones: they answer first and stop first, so the word opens and closes from the middle without any delay written by hand.
The stretch becomes two axes of the variable font, written in font-variation-settings on the inner span: the width goes from 82 to 125 and the weight drops from 640 to 380, because a pulled rubber band gets thinner. Pressed, the word goes below zero: width 75 and weight 820.
With speed every letter moves a few pixels against the scroll on a second, softer spring, the outer ones more: the word bends very slightly. That move is a GSAP y on the outer span, so it never touches the axes on the inner one.
The rule underneath takes the real width of the word every frame and its colour mixes grey and orange by the stretch of the widest letter. The ruler at the edge is a background of two repeating gradients, every 12 and every 60 pixels, moved by as much as the page scrolls.
| Name | File | Default | What it changes |
|---|---|---|---|
WORD | script.js | Momentum | The word. |
REST_WIDTH | script.js | 82 | The width of the letters at rest, from 75 to 125. |
FAST_WIDTH | script.js | 125 | The width at full speed, from 75 to 125. |
REST_WEIGHT | script.js | 640 | The weight at rest. |
FAST_WEIGHT | script.js | 380 | The weight at full speed: stretched letters get thinner. |
PRESS_WEIGHT | script.js | 820 | The weight while you hold the word down. |
FULL_SPEED | script.js | 0.9 | How many screens per second stretch the word most of the way: lower, it stretches sooner. |
BOUNCE | script.js | 0.5 | How springy the letters are: 0.2 calm, 0.8 jelly. |
DRAG | script.js | 5 | How many pixels the letters trail behind the scroll. |
SMOOTH | script.js | 1 | Seconds of the smooth scroll; 0 for the browser’s own. |
For a long page that wants you to feel the motion: the opening of a motion design studio, a type foundry, a sports brand or a running app, or a single word between two sections of a portfolio.
The same animation with adapted sizes: the word is sized to fit the box even fully stretched, in width and height, and it stretches the same way under the finger; press and hold and it squeezes.
The word is already at its size, the rule is grey and everything appears in a fade; scrolling does not stretch the word and nothing moves, and the scroll is the browser’s own.
GSAP 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.0 KB; the libraries: GSAP 28 KB, Lenis 5.3 KB.
Tested on 31 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.