
Long shadow letters
Text, Scroll, 3D
Scroll inside the preview
The flavour slider of Scorchly, a made-up brand of spicy almonds and peanuts, in the premium style of the product pieces: the stage stays still and, as you scroll, the four flavours take turns. The giant word of the flavour drops out of its mask letter by letter while the new one falls from above, the bag spins away and the new one comes in from the other side, lands one pixel too far with a small sway, the shadow underneath goes out and spreads again, the ground takes the colour of the flavour and the name strips and the round button pop back from nothing.
Rebuilt from scratch studying henrietta.wearetattoodigital.com by Tattoo Digital: 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>
<!--
"Flavour swap scroll" 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>Scorchly, seriously spicy nuts</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/archivo@5.3.0/wdth.css">
<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>
<!-- the flavour slider of a made-up spicy snack brand, Scorchly. A sticky stage: as you scroll, the giant word of the
flavour drops out letter by letter while the next one falls in from above, the bag spins away and the next bag
spins in from the other side and lands with a small sway, the ground takes the colour of the flavour, the shadow
goes out and spreads again under the new bag, the lines of the description slide in their masks and the strips
and the round button pop back from nothing -->
<svg class="defs" width="0" height="0" aria-hidden="true" focusable="false">
<defs>
<linearGradient id="lati" x1="0" x2="1" y1="0" y2="0">
<stop offset="0" stop-color="#000" stop-opacity=".42"/>
<stop offset=".07" stop-color="#000" stop-opacity=".12"/>
<stop offset=".2" stop-color="#fff" stop-opacity=".16"/>
<stop offset=".32" stop-color="#fff" stop-opacity="0"/>
<stop offset=".72" stop-color="#000" stop-opacity="0"/>
<stop offset=".9" stop-color="#000" stop-opacity=".2"/>
<stop offset="1" stop-color="#000" stop-opacity=".46"/>
</linearGradient>
<linearGradient id="alto" x1="0" x2="0" y1="0" y2="1">
<stop offset="0" stop-color="#fff" stop-opacity=".12"/>
<stop offset=".18" stop-color="#fff" stop-opacity="0"/>
<stop offset=".86" stop-color="#000" stop-opacity="0"/>
<stop offset="1" stop-color="#000" stop-opacity=".22"/>
</linearGradient>
<linearGradient id="riflesso" x1="0" x2="0" y1="0" y2="1">
<stop offset="0" stop-color="#fff" stop-opacity="0"/>
<stop offset=".3" stop-color="#fff" stop-opacity=".34"/>
<stop offset=".62" stop-color="#fff" stop-opacity=".16"/>
<stop offset="1" stop-color="#fff" stop-opacity="0"/>
</linearGradient>
<pattern id="crimp" width="2.6" height="20" patternUnits="userSpaceOnUse">
<rect width=".9" height="20" fill="#000" fill-opacity=".16"/>
<rect x=".9" width=".5" height="20" fill="#fff" fill-opacity=".1"/>
</pattern>
<filter id="morbido" x="-50%" y="-10%" width="200%" height="120%"><feGaussianBlur stdDeviation="2.4"/></filter>
</defs>
</svg>
<section class="corsa" data-corsa>
<div class="palco" data-palco>
<div class="luce" aria-hidden="true"></div>
<div class="parole" data-parole aria-hidden="true"></div>
<div class="ombra" data-ombra aria-hidden="true"><div class="ombra__in" data-ombra-in></div></div>
<div class="sacchi" data-sacchi></div>
<header class="testa" data-testa>
<p class="marca">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8.2 1.2c2.6 2.2 4.3 4.6 4.3 7.4a4.5 4.5 0 0 1-9 0c0-1.7.8-3.1 1.9-4.2.1 1.3.7 2.2 1.6 2.6-.2-2.3.2-4.1 1.2-5.8z"/></svg>
Scorchly
</p>
<nav class="gusti" data-gusti aria-label="Flavours">
<span class="gusti__pillola" data-pillola aria-hidden="true"></span>
</nav>
</header>
<div class="strisce" data-strisce></div>
<div class="piede">
<div class="descrizioni" data-descrizioni></div>
<div class="bottoni" data-bottoni></div>
</div>
<div class="grana" aria-hidden="true"></div>
</div>
</section>
<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.
19 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 “Flavour swap scroll” from Animorio and fit it into my siteAll the changes are one paused GSAP timeline, a change every 3.6 timeline seconds, and ScrollTrigger drives it back and forth with scrub while the stage stays still with position: sticky, 100lvh tall. Lenis smooths the wheel. The waiting flavours start in their starting places: the letters above the mask, the bag hidden, strips and button at scale zero.
Each letter of the giant word sits in a span with overflow hidden and line-height 1 (with the word’s tight line-height the glyphs would overflow their box and a sliver would show above the mask). The old letter goes to yPercent 101 with back.inOut(1.7) and a 0.05 stagger; the new one starts from -101. If the word is wider than the stage, the type shrinks by itself.
The bag is two elements: the outer one travels (x of 30 hundredths of the width, y of 110 hundredths of the height, rotation of 180 degrees, sine.in leaving and sine.out arriving, with the measures in functions taken again on resize), the inner one, pivoting at the bottom, does the landing: one pixel lower and three sways that die out. This way the two movements never cancel each other.
The shadow is an oval with a blurred radial gradient: when the bag leaves it goes to zero opacity and scale 0.6, when it lands it goes to 1.16 and back to 1 with back.out(2). The ground and the type colour are two CSS variables, --bg and --ink, that GSAP blends from one colour to the next: all the type, the button ring and the pill of the row follow them by themselves.
One drawing for the four flavours, with the colour in a variable: the body, the zigzag seal made by a loop, the crimp with a pattern of lines, and on top three shared layers of light (a gradient dark at the sides and light at a quarter, one from top to bottom, the reflection blurred with feGaussianBlur). The two-layer shadow is a drop-shadow on the SVG.
| Name | File | Default | What it changes |
|---|---|---|---|
RIDE | script.js | 1 | How much scroll the four flavours take: 2 is twice as long. |
SCRUB | script.js | 1 | How many seconds the stage lags behind the scroll (the site uses 1.4). |
SPIN | script.js | 180 | Degrees the bag turns leaving and arriving. |
DRIFT | script.js | 30 | How far sideways the bag travels, in hundredths of the width. |
WOBBLE | script.js | 3 | Degrees of the sway when the bag lands. |
CHAR_STAGGER | script.js | 0.05 | Delay between the letters of the giant word. |
SHADOW | script.js | 0.42 | How dark the shadow under the bag is. |
GRAIN | script.js | 0.1 | How much grain on the colour of the ground. |
For the product showcase of a brand with a few strong variants: the flavours of a snack, a drink or an ice cream, the colours of a bottle, the blends of a coffee. Each variant has its own colour and word, and whoever scrolls sees them one at a time without leaving the page.
The same: the giant word is sized with min(26vw, 34vh) and shrinks if it goes past the sides, the bag with min(48vh, 66vw), the row of flavours and the mark tighten with the screen. The stage is 100lvh tall, so on Safari it does not jump when the bar hides.
No falling letters and no spinning bags: scrolling, one flavour fades into the next in place, the ground changes colour and the round in the row moves.
GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Archivo (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.3 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.
Tested on 15 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.