
Speeding marquee
Scroll, Text, Hover
Search inside a document in Draftly, a made-up writing app, in the clean style of today’s apps: Ctrl F drops the bar, a word is typed and every time it appears in the text it lights up one after another with a soft highlighter. The arrows jump from one to the next, the document scrolls there, the active word swells once and the counter rolls; on the right a thin rail marks where they all are.
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>
<!--
"Find in page" 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 find in page search with the words 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>
<!-- a made-up docs app, Draftly: Ctrl F opens the find bar, a word is typed, every match lights up,
the arrows jump from one to the next and the page scrolls to it -->
<section class="doc" aria-label="Draftly document with find in page" data-card>
<header class="doc__top">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M5 3h7l3 3v11H5z"/><path d="M8 9h4M8 12h4M8 15h2"/></svg>
<span class="brand__name">Draftly</span>
<span class="brand__sep" aria-hidden="true">/</span>
<span class="brand__doc">Brand voice guide</span>
</span>
<span class="keys" aria-hidden="true"><kbd data-key>Ctrl</kbd><kbd data-key>F</kbd></span>
</header>
<div class="doc__body">
<div class="find-wrap" data-wrap>
<div class="find" role="search" data-find>
<svg class="find__icon" viewBox="0 0 20 20" aria-hidden="true"><circle cx="8.5" cy="8.5" r="5.5"/><path d="m13 13 4 4"/></svg>
<input class="find__input" data-input type="text" placeholder="Find in document" aria-label="Find in document" spellcheck="false" autocomplete="off">
<span class="find__count" aria-live="polite"><span class="roll"><span class="roll__col" data-roll></span></span><span class="find__of">of</span><span data-total>0</span></span>
<span class="find__div" aria-hidden="true"></span>
<button class="find__btn" type="button" aria-label="Previous match" data-prev><svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5.5 12.5 4.5-4.5 4.5 4.5"/></svg></button>
<button class="find__btn" type="button" aria-label="Next match" data-next><svg viewBox="0 0 20 20" aria-hidden="true"><path d="m5.5 7.5 4.5 4.5 4.5-4.5"/></svg></button>
<button class="find__btn" type="button" aria-label="Close find" data-close><svg viewBox="0 0 20 20" aria-hidden="true"><path d="m6 6 8 8M14 6l-8 8"/></svg></button>
</div>
</div>
<div class="doc__view" data-view>
<article class="page" data-page></article>
<div class="rail" aria-hidden="true" data-rail><span class="rail__thumb" data-thumb></span></div>
</div>
</div>
</section>
<svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 2.8v16.4l4.2-4 2.8 6.2 2.9-1.3-2.8-6.1h5.9Z"/></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.
23 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 “Find in page” from Animorio and fit it into my siteThe text is a list of blocks, heading and paragraphs. On every search the script rebuilds them, splitting the text with a case-insensitive regular expression, and each match becomes a span with two children: the wash and the text.
The wash sits absolutely behind the word and grows with scaleX from the left, in a row with a stagger and a light back.out: the text is not inside the wash, so it never squashes.
The page does not really scroll: it is moved up with a transform until the active word sits a little above the middle of the window, within the limits of the document. The rail handle follows the same number.
The counter is a column of digits from zero to the total inside a window one line high: to go to match n the column moves up n lines with yPercent.
For every match a thin dash on the rail on the right, at the same height in proportion to the document; the one for the active word is darker and thicker.
| Name | File | Default | What it changes |
|---|---|---|---|
QUERY | script.js | brand | The word the autopilot searches for in the document. |
TYPE | script.js | 0.11 | The seconds between one letter and the next while the word is typed. |
LIGHT | script.js | 0.07 | The seconds between one match and the next as they light up. |
SCROLL | script.js | 0.65 | The seconds the document takes to scroll to the active word. |
STEP | script.js | 0.95 | The seconds between one jump and the next with the autopilot. |
PULSE | script.js | 1.1 | How much the active word swells when it is reached, once only. |
HIT_COLOR | script.js | #fde68a | The colour of the matches. |
ACTIVE_COLOR | script.js | #f59e0b | The colour of the active word and the marks on the rail. |
For the landing page of a docs, notes or writing app, or an editor: it shows in a few seconds something everyone uses, searching for a word and jumping from one result to the next. Also as a real search inside a long page of text.
The same animation with adapted sizes: the document is also sized on the window height, the text shrinks with the short side, under 420 pixels the app name disappears and the bar gets narrower; the arrows and the cross are tapped with a finger.
No dropping bar, growing wash, smooth scroll or swell: the bar is already open with the word typed, the matches are already lit and the third is active; the arrows change the active word and move the document without motion.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.3 KB; the libraries: GSAP 28 KB.
Tested on 28 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.