
Speeding marquee
Scroll, Text, Hover
A minimal text animation with a single gesture: every letter of the headline leans from its foot toward the pointer, like a stem toward the light, and stands back up on a spring when the pointer moves away. The nearest letter takes the accent colour and a touch of weight, and a short mark slides along the rule and stops under it.
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>
<!--
"Leaning letters 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>The headline that leans toward you</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>
<main class="scena" data-stage>
<p class="marchio">Alder Type Foundry</p>
<!-- the headline: the script splits it into letters, each one leaning from its own foot toward the pointer -->
<h1 class="titolo" data-title aria-label="Toward the light">Toward the light</h1>
<!-- the thin rule under the headline, with the short accent mark that slides under the nearest letter -->
<div class="riga" data-rule><span class="tacca" data-mark></span></div>
<p class="nota" data-note>Move the pointer over the letters</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.
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 “Leaning letters headline” from Animorio and fit it into my siteThe headline is split into words and letters. Each letter sits inside a box: GSAP moves the box for the entrance, CSS rotates the letter with rotate(var(--a)). That way the GSAP transform never wipes out the rotation.
For each letter the distance from the pointer is measured: the pull falls off like a bell, exp(-d²/R²), with R equal to REACH times the letter height. The angle follows the horizontal distance, clamped to plus or minus LEAN: zero over the letter, strongest a little to the side.
Each letter has an angle and a velocity and chases the wanted angle on a spring (SPRING and DAMPING) in the GSAP ticker. The pivot sits at 92% of the height, on the letter’s foot: it leans like a stem instead of spinning on its centre.
The same pull sets the colour, with color-mix between the ink and the orange, and the weight, from 640 to 740. The mark on the rule chases the nearest letter on its own spring and fades when none is close.
A click gives each letter a push away from the point, delayed by distance: the spring does the rest.
| Name | File | Default | What it changes |
|---|---|---|---|
TITLE | script.js | Toward the light | The headline. |
LEAN | script.js | 14 | How far a letter leans at most, in degrees. |
REACH | script.js | 1.9 | How far the pull reaches, in letter heights. |
SPRING | script.js | 170 | How stiff the letters are. |
DAMPING | script.js | 13 | How quickly the swing dies down. |
ACCENT | script.js | 1 | How much the nearest letter takes the accent. |
RIPPLE | script.js | 1 | The strength of the click ripple. |
SPEED | script.js | 1 | The speed of the invisible pointer. |
For the opening of a type foundry, a studio or a portfolio, for a headline that should answer whoever passes by without filling the page.
The same animation with adapted sizes: the headline breaks onto two lines and the letters lean toward the finger as it touches or slides.
The letters stay upright: only the colour of the nearest letter changes softly, and the mark moves without a spring.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 4.3 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.