
Speeding marquee
Scroll, Text, Hover
The answer panel of a made-up AI research assistant, Quarry, on a near black page. While it searches, a beam of light runs round the panel's edge and the status pill says ‘Searching 4 sources’ with a shimmer; then the answer writes itself word by word, each new word arriving white, blurred and with a blue glow that cools into the ink, so the edge of the text carries a wave of light. Each citation number pops into the text on a short spring and lights up and lifts the card of its source below. Hovering a number marks the sentence it backs and widens its source while the others step back.
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>
<!--
"Answer with sources" 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 assistant answer that writes itself with the sources lighting up</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" data-stage>
<!-- the answer panel of a made-up research assistant, Quarry. The answer writes itself word by word with a wave of
light on the edge of the newest words; each citation pill lights up and lifts its source card below. Hovering a
pill marks the sentence it backs and widens its source -->
<section class="panel" data-panel aria-label="Quarry answer">
<span class="panel__beam" data-beam aria-hidden="true"></span>
<span class="panel__sheen" aria-hidden="true"></span>
<header class="panel__head">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M10 2.2l6.8 3.9v7.8L10 17.8l-6.8-3.9V6.1z" />
<path class="brand__cut" d="M10 2.2v7.8l6.8 3.9" />
</svg>
<span class="brand__name">Quarry</span>
</span>
<span class="status" data-status>
<svg class="status__icon" viewBox="0 0 16 16" aria-hidden="true">
<circle class="status__track" cx="8" cy="8" r="6" />
<circle class="status__arc" data-arc cx="8" cy="8" r="6" pathLength="1" />
<path class="status__check" data-check pathLength="1" d="M4.8 8.3l2.2 2.2 4.3-4.6" />
</svg>
<span class="status__words">
<span class="status__word status__word--search" data-search>Searching 4 sources</span>
<span class="status__word status__word--ready" data-ready>Answer ready</span>
</span>
<span class="status__time" data-time>3.8s</span>
</span>
</header>
<h1 class="query" data-query>Do houseplants really clean the air at home?</h1>
<p class="answer" data-answer>
<span class="sent" data-sent="1">Only a little. The well known 1989 tests sealed single plants in small chambers, a result that does not scale to a real room.</span><button class="cite" type="button" data-cite="1" aria-label="Source 1, fernstudy.org">1</button>
<span class="sent" data-sent="2">A 2019 review worked out you would need 10 to 1,000 plants per square metre to match ordinary ventilation.</span><button class="cite" type="button" data-cite="2" aria-label="Source 2, atriumreview.net">2</button>
<span class="sent" data-sent="3">Plants do lift humidity and mood,</span><button class="cite" type="button" data-cite="3" aria-label="Source 3, leafandmood.com">3</button>
<span class="sent" data-sent="4">but an open window or a HEPA purifier cleans far more air.</span><button class="cite" type="button" data-cite="4" aria-label="Source 4, ventwell.guide">4</button>
</p>
<ul class="sources" data-sources aria-label="Sources">
<li class="src" data-src="1" style="--tile: #4f8a68">
<span class="src__lift" data-lift>
<span class="src__glow" aria-hidden="true"></span>
<span class="src__tile" aria-hidden="true">F</span>
<span class="src__text">
<span class="src__site">fernstudy.org</span>
<span class="src__title">What the 1989 chamber tests measured</span>
</span>
<span class="src__num">1</span>
</span>
</li>
<li class="src" data-src="2" style="--tile: #a9804a">
<span class="src__lift" data-lift>
<span class="src__glow" aria-hidden="true"></span>
<span class="src__tile" aria-hidden="true">A</span>
<span class="src__text">
<span class="src__site">atriumreview.net</span>
<span class="src__title">Plants against air exchange, a review</span>
</span>
<span class="src__num">2</span>
</span>
</li>
<li class="src" data-src="3" style="--tile: #8c66b8">
<span class="src__lift" data-lift>
<span class="src__glow" aria-hidden="true"></span>
<span class="src__tile" aria-hidden="true">L</span>
<span class="src__text">
<span class="src__site">leafandmood.com</span>
<span class="src__title">Humidity, light and how a room feels</span>
</span>
<span class="src__num">3</span>
</span>
</li>
<li class="src" data-src="4" style="--tile: #4b78b0">
<span class="src__lift" data-lift>
<span class="src__glow" aria-hidden="true"></span>
<span class="src__tile" aria-hidden="true">V</span>
<span class="src__text">
<span class="src__site">ventwell.guide</span>
<span class="src__title">Windows and purifiers, measured</span>
</span>
<span class="src__num">4</span>
</span>
</li>
</ul>
</section>
<svg class="pointer" data-pointer viewBox="0 0 20 20" aria-hidden="true">
<path d="M4.5 2.8l10.6 8.1-4.6.6 2.6 5.1-2.1 1-2.6-5.1-3.4 3.2z" />
</svg>
<p class="sr" aria-live="polite" data-live></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.
50 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 “Answer with sources” from Animorio and fit it into my siteEach sentence is split into words, each in an inline-block span with the spaces kept as text, so lines wrap as before. The last word of each sentence and its number go into a span with white-space: nowrap: the number is never left alone at the start of a line. All the words are already in place, transparent: the panel doesn't change height while it writes.
Each word has two tweens starting together: opacity, y and blur in 0.38 s, and colour and text-shadow from white with a blue glow to the ink in WAVE seconds, with power1.in. Since words start every WORD_GAP seconds, the last ten or fifteen are still warm: that overlap makes the wave, no mask.
The number comes in with scale from 0.3 to 1 and back.out(2.6); at the same moment the timeline calls light(n): the card's glow rises, the card goes up LIFT + 2 pixels with power3.out and comes back to one pixel above its place with elastic.out(1, 0.55), staying lit at 70 %.
mark(n) does it all with overwriting tweens: the sentence background goes from background-size 0% to 100% (with box-decoration-break: clone the band follows the lines), the number fills, the marked card takes flex-grow to WIDEN and the others drop to 42 %. A container query hides the words of cards that are too narrow: the initial and the number stay.
A conic-gradient with the light in a single slice, masked with two linear-gradients and mask-composite: exclude to leave only a one pixel ring. GSAP turns the --a variable from 0 to 360 degrees in BEAM_TURN seconds, always; only its opacity changes while Quarry works.
| Name | File | Default | What it changes |
|---|---|---|---|
WORD_GAP | script.js | 0.055 | Seconds between one word and the next. |
WAVE | script.js | 0.8 | How long a new word keeps its light before it cools: higher, longer wave. |
BLUR | script.js | 5 | How blurred a word is when it arrives, in pixels. |
SEARCH_FOR | script.js | 1.7 | Seconds of searching before the first word. |
LIFT | script.js | 4 | How many pixels a cited source card rises. |
WIDEN | script.js | 3 | How much wider the marked source grows than the others. |
BEAM_TURN | script.js | 2.2 | Seconds for one run of the beam round the edge. |
LOOP | script.js | true | Left alone, it shows itself and writes the answer again. |
For the answer of an AI assistant, an internal search, a help centre or a docs tool: wherever a generated answer must show where each sentence comes from, and the reader should be able to check a source without leaving the text.
The same animation with adapted sizes: the panel takes almost the whole width, question and answer scale with the screen's height, the source cards show initial and number when they are narrow. You tap the number with your finger: tap again, or outside, to clear the mark.
No beam, no blur and no movement: the answer fades in all at once, the numbers and sources light up with a fade, the status turns to ‘Answer ready’. The sentence mark on hover stays, with no widening cards and no pointer.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.5 KB; the libraries: GSAP 28 KB.
Tested on 7 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.