
Speeding marquee
Scroll, Text, Hover
A Halloween headline in the dark, standing on a shelf, in minimal style: a candle follows the pointer in front of the letters, the nearby ones warm to orange and gain weight, and every letter throws a long shadow up the wall that trembles with the flame. A click blows it out, and it lights again by itself.
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>
<!--
"Candlelit headline" 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>By candlelight</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 headline in the dark, read by candlelight. The candle stands on the shelf in front of the letters and follows the
pointer along it; the letters near the flame warm up and take weight, and every letter throws a long shadow up the
wall, away from the flame, trembling with it. Click (or tap) to blow the candle out; it lights again by itself. -->
<main class="stanza" data-stanza>
<div class="muro" data-muro aria-hidden="true"></div>
<p class="occhiello" data-occhiello>Hollow Lane Reading Room</p>
<div class="scena" data-scena>
<div class="ombre" data-ombre aria-hidden="true"></div>
<h1 class="titolo" data-titolo>Something wicked this way comes</h1>
<div class="mensola" data-mensola aria-hidden="true"></div>
<div class="candela" data-candela aria-hidden="true">
<div class="candela__luce" data-alone></div>
<div class="candela__corpo" data-corpo>
<canvas class="candela__fuoco" data-fuoco></canvas>
<span class="candela__stoppino" data-stoppino></span>
<div class="candela__cera">
<span class="candela__pozza"></span>
<span class="candela__colata" data-colata><i></i></span>
<span class="candela__colata candela__colata--due" data-colata><i></i></span>
</div>
<span class="candela__ombra"></span>
</div>
<span class="candela__piattino"><i></i></span>
</div>
</div>
<p class="sotto" data-sotto>Halloween night. Ghost stories by candlelight, 9 pm.</p>
<p class="aiuto" data-aiuto>Move the candle. Click to blow it out.</p>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.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 “Candlelit headline” from Animorio and fit it into my siteThe script splits the headline into lines, words and letters twice: one copy is the letters, the other, beneath and in the same place, is their shadows. Every letter keeps the width measured in the dark, so when it gains weight it widens in place and the headline does not move; the shadow gets the same width.
The candle chases the pointer on a spring (0.09 stiffness, 0.72 damping). The flicker is a sum of three sines that never repeat, plus an occasional jolt: it moves the size of the flame, the reach of the light, the light on the wall and the shadows.
For each letter the distance from the flame, with the vertical part weighted 1.25 times, becomes a warmth exp(−(d/R)²) with R of 2.6 em. Warmth mixes the colour from the dark to pumpkin orange and then to warm white, takes the weight from 380 to 700 on the wght axis and lights an orange glow. Letters are rewritten only when they change.
Every shadow starts at the letter’s foot (transform-origin at 50% and 86%) and leans with a skewX of the angle between letter and flame, stretches with scaleY, more when the flame is close, and blurs with distance. The flicker adds a few degrees and a little length: the shadow trembles with the flame.
On click a GSAP timeline takes the light to zero in 0.42 s, raises a thread of SVG smoke with stroke-dashoffset and after 1.75 s lights it again with elastic.out: the flame grows past its size and settles.
| Name | File | Default | What it changes |
|---|---|---|---|
TITOLO | script.js | Something wicked|this way comes | The headline; the vertical bar starts a new line. |
RAGGIO | script.js | 2.6 | How far the flame warms, in the headline’s em. |
LUNGHEZZA | script.js | 1.6 | How far the shadows stretch up the wall. |
TREMOLIO | script.js | 1 | How much the flame flickers, and with it the light and the shadows. |
PESO | script.js | 700 | The weight of the letters closest to the flame. |
GIRO | script.js | 12 | How many seconds the candle takes to go round on its own. |
--zucca | style.css | #ff7a1a | The orange of the flame and the warm letters. |
For the opening of a Halloween page, a night of stories, an exhibition or a night-time event, or for the headline of a section that should feel read by candlelight.
The same animation with adapted sizes: the headline and the candle are sized on the height too, the candle is dragged with a finger and a tap blows it out.
The candle stays still and does not flicker, the shadows are still, no breath or smoke: a click fades the light down and up again.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.
Tested on 30 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.