
Speeding marquee
Scroll, Text, Hover
The regular expression tester of a developer tool: the pattern is typed in a real field and the matches light up in the text at every key, from thirty-five digits down to three dates. Each group has its colour in the pattern, in the text and in the chips below, which say what it captured in the match being read.
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>
<!--
"Regex tester" 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>Regex tester</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 regular expression tester: the pattern is a real input, the matches light up in the sample text
as it is typed, and each capture group has its colour in the pattern, in the text and in the chips -->
<section class="rx" data-rx aria-label="Regular expression tester">
<header class="rx__head">
<span class="rx__name">Pattern</span>
<span class="rx__roll rx__status" aria-live="polite"><span data-status></span></span>
</header>
<label class="rx__field" data-field>
<span class="rx__slash" aria-hidden="true">/</span>
<span class="rx__box">
<span class="rx__mirror" data-mirror aria-hidden="true"></span>
<input class="rx__input" data-input type="text" aria-label="Regular expression" autocomplete="off" autocapitalize="off" autocorrect="off" spellcheck="false">
</span>
<span class="rx__slash" aria-hidden="true">/g</span>
</label>
<div class="rx__text" data-text aria-label="Sample text"></div>
<div class="rx__groups" data-groups aria-label="Capture groups of the match being read"></div>
</section>
<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.
16 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 “Regex tester” from Animorio and fit it into my siteThe pattern goes to new RegExp with the g and d flags inside a try: if it is valid the matches are found, if not the card flags the error and keeps the previous result. The d flag gives each group’s indices, needed to colour them in the text.
An input cannot have letters of different colours: its text is transparent and under it lies a copy, character by character, coloured by the group it belongs to. A small function reads the pattern and counts the capturing brackets.
At every key the text is rebuilt with one mark per match. Those already there, same start and same end, do not replay the animation; new ones come in one after the other with the background widening from the left.
A class on the card dims everything except elements carrying the chosen group’s number: the same attribute sits in the pattern’s mirror and in the text, so one querySelectorAll is enough.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #c8f55a | The colour of the caret, the count and the ring around the match being read. |
SPEED | script.js | 1 | How fast the demo types the pattern: 0.5 = slow, 2 = fast. |
POP | script.js | 1 | How much the highlight swells when a match lights up: 0 = none, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo types the pattern piece by piece and then reads the groups. |
On the page of a developer tool, in a language’s documentation, in an online editor, in the filter panel of an app that searches logs. The same coloured mirror under a field suits a formula, a query or a command.
The same card, as wide as the screen, with slightly smaller type so pattern and lines fit. You type with the phone keyboard; a date or a chip is read by tapping it.
The pattern is already written and the three dates already highlighted; matches change without animation and values without rolling. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.0 KB; the libraries: GSAP 28 KB.
Tested on 20 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.