
Speeding marquee
Scroll, Text, Hover
The test screen of an app for learning to type, on black: the caret glides on a spring from letter to letter, right letters take ink and wrong ones turn red, words per minute count live with their curve and the run ends in a result. You can really type on 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>
<!--
"Typing speed test" 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>Typing speed test</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">
<!-- the test screen of a made-up typing app: the caret glides from letter to letter on a spring, right letters
take ink and wrong ones turn red, words per minute count live with their curve, and the run ends in a result -->
<section class="tt" data-tt aria-label="Typing speed test">
<header class="tt__stats">
<span class="tt__stat tt__stat--big"><b data-wpm>0</b><i>wpm</i></span>
<span class="tt__stat"><b data-acc>100%</b><i>accuracy</i></span>
<span class="tt__clock">
<svg viewBox="0 0 40 40" aria-hidden="true"><circle class="tt__track" cx="20" cy="20" r="16"></circle><circle class="tt__arc" data-arc cx="20" cy="20" r="16" pathLength="1" transform="rotate(-90 20 20)"></circle></svg>
<b data-secs></b>
</span>
</header>
<div class="tt__pad" data-pad>
<div class="tt__view" data-view>
<p class="tt__text" data-text aria-hidden="true"></p>
<i class="tt__caret" data-caret aria-hidden="true"></i>
</div>
<input class="tt__in" data-in type="text" aria-label="Type the text shown" autocapitalize="off" autocomplete="off" autocorrect="off" spellcheck="false">
<div class="tt__result" data-result>
<span class="tt__verdict" data-verdict></span>
<span class="tt__detail" data-detail></span>
<button class="tt__again" type="button" data-again>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M13 8a5 5 0 1 1-1.600-3.700M13 2.500v3h-3"></path></svg>
Try again
</button>
</div>
</div>
<svg class="tt__curve" data-curve aria-hidden="true"><path class="tt__fill" data-fill></path><path class="tt__line" data-line></path></svg>
<p class="tt__say" data-say aria-live="polite"></p>
</section>
</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.
17 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 “Typing speed test” from Animorio and fit it into my siteEvery letter is a span, grouped by word in a block that never breaks mid-word. The caret’s place is read from offsetLeft and offsetTop of the letter that comes next, and read again on resize and once the fonts are loaded.
Two stiff springs on GSAP’s ticker, one per axis, take it to its target with a hair of overshoot; the lean and the stretch come from its speed. Still for more than 0.7 seconds, it breathes on a cosine.
A transparent input covers the lines: it takes focus on a tap, opens the keyboard on a phone and passes characters to the same type() the demo uses. Backspace comes both from keydown and from inputType, because phone keyboards send no key events.
Right characters divided by five, divided by the minutes elapsed (never less than 1.2 seconds, or the first key would give an absurd number). The curve instead follows the pace of the last two seconds, a sample every quarter second, and tightens as time goes by.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ffcf4a | The colour of the caret, the words per minute and the curve. |
TEXT | script.js | the quiet harbour wakes before the town and the first boats slip out past the wall | The text to type. |
LIMIT | script.js | 30 | The seconds allowed: the ring runs them down. |
SPEED | script.js | 96 | How many words per minute the demo types at by itself. |
GLIDE | script.js | 1 | How springy the caret is: 0.4 = soft, 2 = snappy. |
LOOP | script.js | true | Left alone, the demo types the text, hits a wrong letter, fixes it and starts again. |
In the app or site of a typing course, in a speed game, on the try-it page of a keyboard for sale. The sprung caret alone suits any text field that wants to feel cared for: an editor, a chat, a command line.
A tap on the text opens the phone’s keyboard and you type for real; the demo alone never opens it. The text shrinks looking at the window’s height too, so three lines, the numbers and the curve all fit together.
The caret moves from letter to letter without gliding or leaning, letters change colour without settling or shaking, the text changes line at once and the result appears in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.9 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.