
Speeding marquee
Scroll, Text, Hover
The live translation card of Velino, a made-up travel translator, white on a warm page: the English sentence lights up word by word as it is heard, underneath the Italian first arrives in the English order, every grey word turning into its Italian one, then the words that sit elsewhere in Italian swap places on two small arcs. Thin threads join every word to its match: they cross where the order changes. Hovering a word lights it, its partner, the thread and a note on why it moved.
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>
<!--
"Live translation card" 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 live translation card with the words that swap places</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 live translation card of Velino, a made-up travel translator. The English sentence lights up word by
word as it is heard; underneath its Italian comes in first in the English order, every word turning into its
translation, then the words that sit differently in Italian swap places on two small arcs. Thin threads join
every word to its match; hovering a word lights its pair, its thread and a short note on why it moved -->
<article class="tr" data-card>
<span class="tr__sheen" aria-hidden="true" data-sheen></span>
<header class="tr__head">
<span class="tr__brand">
<svg class="tr__mark" viewBox="0 0 20 20" aria-hidden="true">
<path d="M3.5 5.5c2.2 0 3.4 1.2 4.2 3.4l2.3 6.6 2.3-6.6c.8-2.2 2-3.4 4.2-3.4"/>
<path class="tr__mark-tick" d="M10 3.2v2.1"/>
</svg>
Velino
</span>
<span class="tr__pair">
<span class="tr__lang" data-from>English</span>
<button class="tr__swap" type="button" aria-label="Swap languages" data-swap>
<svg viewBox="0 0 16 16" aria-hidden="true" data-swap-icon>
<path d="M2.8 5.6h9.6M9.6 2.8l2.8 2.8-2.8 2.8"/>
<path d="M13.2 10.4H3.6M6.4 7.6l-2.8 2.8 2.8 2.8"/>
</svg>
</button>
<span class="tr__lang" data-to>Italian</span>
</span>
</header>
<section class="tr__pane tr__pane--src">
<span class="tr__label">
<span data-state>Listening</span>
<span class="tr__wave" aria-hidden="true" data-wave><i></i><i></i><i></i><i></i><i></i></span>
</span>
<p class="tr__line tr__line--src" data-src></p>
</section>
<div class="tr__seam" aria-hidden="true"></div>
<section class="tr__pane tr__pane--out">
<span class="tr__label">Italian</span>
<p class="tr__line tr__line--out" data-out></p>
<p class="tr__note" data-note aria-live="polite"></p>
</section>
<footer class="tr__foot">
<span class="tr__conf">
<span class="tr__meter" aria-hidden="true"><span class="tr__meter-fill" data-meter></span></span>
<span class="tr__conf-num"><span data-conf>0</span>% match</span>
</span>
<span class="tr__tools">
<button class="tr__tool" type="button" aria-label="Play the Italian" data-play>
<svg viewBox="0 0 16 16" aria-hidden="true">
<path d="M2.8 6.2h2.4L8.6 3.4v9.2L5.2 9.8H2.8z"/>
<path class="tr__ray" d="M10.8 6.1c.7.6.7 3.2 0 3.8"/>
<path class="tr__ray" d="M12.6 4.6c1.5 1.4 1.5 5.4 0 6.8"/>
</svg>
</button>
<button class="tr__tool tr__tool--copy" type="button" aria-label="Copy the translation" data-copy>
<svg viewBox="0 0 16 16" aria-hidden="true">
<g data-copy-icon><rect x="5.2" y="5.2" width="7.6" height="7.6" rx="1.8"/><path d="M10.6 3.4H4.8a1.4 1.4 0 0 0-1.4 1.4v5.8"/></g>
<path class="tr__tick" data-tick pathLength="1" d="M4.2 8.4l2.6 2.6 5-5.4"/>
</svg>
</button>
</span>
</footer>
<svg class="tr__threads" aria-hidden="true" data-threads></svg>
</article>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/Flip.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.
24 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 “Live translation card” from Animorio and fit it into my siteA sentence is a list of chunks [English, Italian] (a chunk can be two words, ‘is ready’ and ‘è pronto’), the Italian order as a list of indexes and the chunk to light with its note. Each chunk gets a word above, a word below and an SVG thread: all three share the same number.
The heard word goes from grey to black through the width of the variable typeface (wdth 86 to 100) and a back.out return. The word below leaves upwards narrowing to 72 and blurring, changes its text and comes back in from below from 125 to 100: at the change the outer box tweens from the old width to the new one, so the neighbours slide instead of jumping.
Flip.getState of every word, then appendChild in the Italian order, then Flip.from: the outer box slides to its new place. The inner child, which Flip leaves alone, makes the arc with GSAP keyframes: the one going right rises, the one going left dips, with a 1.05 scale halfway.
In the GSAP ticker every thread is redrawn as a Bézier curve from the bottom of the word above to the top of its partner below, measured with getBoundingClientRect and divided by the card's scale, so they follow the words while they move and cross by themselves where the order changes. pathLength 1 lets them draw in with stroke-dashoffset.
Every word, above and below, on entering lights everything with its number (the two words, the thread, the two dots) and puts the is-focus class on the card, which dims the rest. Entering the card pauses the timeline, leaving it starts again after 0.9 s.
| Name | File | Default | What it changes |
|---|---|---|---|
HEAR_STAGGER | script.js | 0.24 | Seconds between one English word heard and the next. |
MORPH_TIME | script.js | 0.5 | Seconds each word takes to turn Italian. |
SWAP_TIME | script.js | 0.95 | Seconds of the swap. |
ARC | script.js | 0.55 | How high and low the arcs of the swap go, in lines of text. |
HOLD | script.js | 1.9 | Seconds the lit pair and its note stay on. |
THREADS | script.js | true | The thin threads joining every word to its match. |
SPEED | script.js | 1 | 2 = the whole loop twice as fast, 0.5 = half. |
LOOP | script.js | true | Goes on to the next sentence, again and again. |
For a translation or language app, an AI service that translates live, the page of a language course, the section of a landing page that has to show at a glance what the product does.
The same animation with adapted sizes: the card is as wide as the box, text and gaps are sized on the height too, sentences wrap and the threads follow the words onto the second line; a finger taps a word to light its pair.
Nothing moves: heard and translated words change with a fade, the Italian takes its order without sliding, the threads and the lit pair fade in.
GSAP 3.15.0, GSAP Flip 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.9 KB; the libraries: GSAP + Flip 37 KB.
Tested on 9 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.