
Speeding marquee
Scroll, Text, Hover
A film review with its spoilers hidden: two phrases covered by a flickering grain, letter by letter. Tap one and the grain melts away from left to right while the letters arrive one after the other with a small hop. “Reveal all” uncovers what is left and becomes “Hide again”, which covers everything back; below, the count of how many spoilers are still hidden.
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>
<!--
"Spoiler text" 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>Spoiler text</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="stage">
<!-- a film review with its spoilers covered by a moving grain: tap one and it uncovers letter by letter,
or uncover them all and cover them again from the button -->
<article class="sp" data-sp aria-labelledby="sp-title">
<header class="sp__head">
<span class="sp__face" aria-hidden="true">M</span>
<span class="sp__name"><b id="sp-title">The Last Lamp</b><span>Reviewed by Marta V., four out of five</span></span>
</header>
<p class="sp__text" data-text>Slow, salty and beautifully lit. I guessed nothing: <span class="sp__hide" data-spoiler>the keeper was her brother all along</span>, and the final shot, where <span class="sp__hide" data-spoiler>the lamp is left burning for no one</span>, stayed with me all night.</p>
<footer class="sp__foot">
<span class="sp__count" aria-live="polite"><span data-count>2 spoilers hidden</span></span>
<button class="sp__all" type="button" data-all><span class="sp__roll"><span data-alllabel>Reveal all</span></span></button>
</footer>
</article>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
</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.
20 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Spoiler text” from Animorio and fit it into my siteThe script splits each spoiler into words that do not break and each word into letters. Each letter has a variable from 1 (covered) to 0: the text colour and the opacity of the cover, a pseudo-element, are calc() on it.
A tile of specks drawn once on a canvas and set as the background of every cover. A few times a second only the background position changes, so the grain flickers without redrawing anything.
GSAP takes each letter’s variable to 0 with a delay growing by STEP seconds from one to the next, and meanwhile gives the letter a small hop and back.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #6a4df4 | The colour of the button and of the focus ring. |
STEP | script.js | 0.022 | How many seconds pass between one uncovered letter and the next. |
FLICKER | script.js | 12 | How many times a second the grain covering the spoiler changes: 0 = still. |
In reviews of films, series, books and games on a blog or a magazine, in forum comments and chats; and for quiz solutions, exercise answers, the endings of a surprise recipe.
The same card, as wide as the screen minus the margins: the text wraps by itself and covered words stay whole, never split in the middle. The whole spoiler is tappable. The card is about 290 pixels tall and fits the phone box.
The grain is still. Tap a spoiler and the phrase appears all at once, with no letters arriving one at a time, and is covered back the same way. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.4 KB; the libraries: GSAP 28 KB.
Tested on 25 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.
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.