
The liquid grid
Hover, Transitions
The move between two screens of a made-up AI writing app, Penwell, on a near black ground: in the middle sits a bakery’s spring letter rewritten by the AI, with the original tucked under it like a sheet of paper. Compare versions: a light runs over the page, the page splits in two, the original slides out from under it and the rewrite moves the other way, tilting slightly and settling by a pixel; a seam of light opens between them, the words taken out are struck in rose, the new ones light up in green and each edit is tied to its partner by a thread a spark runs along. Hover an edit and the pair lights up while the thread says why it changed. Back to draft tucks the original under the rewrite again.
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>
<!--
"Version compare transition" 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>Penwell, draft to compare</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>
<!-- the writing app of an invented AI, Penwell: the draft it rewrote splits in two, the original slides out from
under it and the edits are tied across by threads of light; Back to draft folds the two pages into one again -->
<main class="palco">
<section class="finestra" data-finestra aria-label="Penwell">
<header class="barra">
<span class="marchio" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M10 2.6 15.4 8 10 17.4 4.6 8z" /><path d="M10 9.6v7.6" /><circle cx="10" cy="8.6" r="1.25" /></svg>
</span>
<span class="barra-titolo">
<strong>Spring letter</strong>
<span class="barra-sotto">
<span data-sotto="bozza">Saffie’s Bakehouse · Saved</span>
<span data-sotto="confronto">Comparing two versions</span>
</span>
</span>
<span class="barra-versione" aria-hidden="true">
<span data-ver="bozza">v2</span>
<span data-ver="confronto">v1 / v2</span>
</span>
</header>
<div class="tavolo" data-tavolo>
<div class="cucitura" data-cucitura aria-hidden="true"><i data-cucitura-luce></i></div>
<article class="pagina pagina--v1" data-pagina="v1" aria-label="Original version">
<div class="pagina-luce" aria-hidden="true"></div>
<header class="pagina-testa">
<span class="etichetta">Original</span>
<span class="quando">Nov 12</span>
</header>
<h2 class="pagina-titolo">Fresh this spring</h2>
<p class="pagina-testo">Our new sourdough <span class="segno segno--tolto" data-segno="0">is finally here</span>. <span class="segno segno--tolto" data-segno="1">It comes out of the oven</span> every morning at 7. Come by and <span class="segno segno--tolto" data-segno="2">try a slice</span>.</p>
<p class="pagina-testo pagina-altro">We bake rye on Fridays and almond croissants all weekend.</p>
<p class="pagina-firma pagina-altro">See you soon, Saffie</p>
<footer class="pagina-piede pagina-altro"><span>36 words</span><span>12 s read</span></footer>
</article>
<article class="pagina pagina--v2" data-pagina="v2" aria-label="Rewritten version">
<div class="pagina-luce" aria-hidden="true"></div>
<div class="scansione" data-scansione aria-hidden="true"></div>
<header class="pagina-testa">
<span class="etichetta etichetta--ai">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8c.5 2.9 1.9 4.3 4.8 4.8-2.9.5-4.3 1.9-4.8 4.8-.5-2.9-1.9-4.3-4.8-4.8 2.9-.5 4.3-1.9 4.8-4.8z" /><path d="M12.6 10.6c.2 1.1.7 1.6 1.8 1.8-1.1.2-1.6.7-1.8 1.8-.2-1.1-.7-1.6-1.8-1.8 1.1-.2 1.6-.7 1.8-1.8z" /></svg>
Penwell rewrite
</span>
<span class="quando">Just now</span>
</header>
<h2 class="pagina-titolo">Fresh this spring</h2>
<p class="pagina-testo">Our new sourdough <span class="segno segno--messo" data-segno="0">has landed</span>. <span class="segno segno--messo" data-segno="1">Fresh from the oven</span> every morning at 7. Come by and <span class="segno segno--messo" data-segno="2">grab a warm slice</span>.</p>
<p class="pagina-testo pagina-altro">We bake rye on Fridays and almond croissants all weekend.</p>
<p class="pagina-firma pagina-altro">See you soon, Saffie</p>
<footer class="pagina-piede pagina-altro"><span>34 words</span><span>10 s read</span></footer>
</article>
<svg class="fili" data-fili aria-hidden="true">
<defs>
<filter id="bagliore" x="-50%" y="-50%" width="200%" height="200%">
<feGaussianBlur stdDeviation="2.4" result="b" />
<feMerge><feMergeNode in="b" /><feMergeNode in="SourceGraphic" /></feMerge>
</filter>
</defs>
</svg>
<span class="motivo" data-motivo aria-hidden="true"></span>
</div>
<footer class="aiuto">
<span class="aiuto-icona" aria-hidden="true">
<svg viewBox="0 0 16 16"><path d="M8 1.8c.5 2.9 1.9 4.3 4.8 4.8-2.9.5-4.3 1.9-4.8 4.8-.5-2.9-1.9-4.3-4.8-4.8 2.9-.5 4.3-1.9 4.8-4.8z" /></svg>
</span>
<span class="aiuto-testo">
<span data-aiuto="bozza"><strong>Penwell rewrote 3 phrases</strong><span class="aiuto-piccolo">Shorter and warmer</span></span>
<span data-aiuto="confronto"><strong><b class="tolte" data-conta="12">12</b> words out <b class="messe" data-conta="10">10</b> in</strong><span class="aiuto-piccolo">Hover an edit to see why</span></span>
</span>
<button class="pulsante" type="button" data-pulsante>
<span class="pulsante-fondo" aria-hidden="true"></span>
<span class="pulsante-scritte">
<span data-scritta="bozza">Compare<span class="lungo"> versions</span></span>
<span data-scritta="confronto">Back to draft</span>
</span>
</button>
</footer>
</section>
<svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.5v15.2l4.1-3.9 2.7 6.2 2.6-1.1-2.7-6.1 5.7-.3z" />
</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.
61 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 “Version compare transition” from Animorio and fit it into my siteThe two versions are two absolute pages of the same size at all times: in the draft the rewrite sits in the middle and the original under it, scaled to 95.5% and lowered a few pixels; in the compare view they stand side by side, or one above the other when the window is narrow. So the text never reflows and GSAP only moves x, y, scale and rotation, measured in pixels and recomputed on resize.
Each edit is a span with two gradient backgrounds: the tint and the line (struck through for removed words, underneath for new ones). Their widths are two CSS variables, --f and --s, that GSAP takes from 0% to 100%; with box-decoration-break: clone it works when an edit wraps to a new line too.
The edits are measured with getClientRects while the pages are at rest, then for each pair an SVG Bézier curve runs from the original’s edge to the rewrite’s edge, only in the gap between them. The thread draws itself with stroke-dashoffset, and a second copy with a short dash and a glow is the spark that runs along it.
| Name | File | Default | What it changes |
|---|---|---|---|
APRI | script.js | 0.95 | How long the page takes to split, in seconds. |
CHIUDI | script.js | 0.75 | How long the way back to the draft takes, in seconds. |
INCLINA | script.js | 1.4 | How many degrees the pages tilt while they part. |
SFALSA | script.js | 0.16 | The delay between one edit and the next as they get tied, in seconds. |
LUCE | script.js | 1 | How visible the light is: the scan, the seam and the sparks on the threads (0 none). |
SOSTA | script.js | 3.2 | How long the compare view stays open in the automatic tour, in seconds. |
--light | style.css | #a3bcff | The blue of the light: threads, seam and scan. |
--out | style.css | #ff8e8e | The rose of the removed words. |
--in | style.css | #7fe3b8 | The green of the new words. |
For a writing app, a document editor or an AI tool that rewrites text: whoever asked for a rewrite opens the comparison with the original, sees at a glance what was taken out and what was added, and hovering an edit reads why.
The same animation with adapted measures: when the window is narrow the two pages part one above the other instead of side by side, the threads run down from the upper page to the lower one, the second paragraph and the page footer hide, and the button just says Compare. A tap turns an edit on and off.
No motion: on click the pages fade out and back in already in place, with the edits coloured and the threads already drawn; the way back does the same in reverse, with fades only.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.
Tested on 15 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.