
Long shadow letters
Text, Scroll, 3D
The headline of a home page inside Penwick, a made-up writing app, in the clean style of today’s apps: you pick a tone, Plain, Warm or Bold, and the sentence rewrites itself with tracked changes. The words leaving are struck through by an orange line and narrow, the new ones type themselves letter by letter on an orange wash, each arriving a little heavier and settling; with Accept the struck words fold away and the whole sentence takes the weight and width of its tone.
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>
<!--
"Tracked changes headline" 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 headline that changes its tone with tracked changes</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 writing app, Penwick: pick a tone and the headline rewrites itself with tracked changes,
struck words going out, new words typing in, then Accept merges them -->
<section class="doc" aria-label="Penwick headline editor" data-doc>
<header class="doc__top">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M4 16.2 13.8 6.4l-0.2-2.2 2.2 0.2L16 6.6 6.2 16.4Z"/><path d="M3.2 17 4 16.2l2.2 0.2-0.8 0.8Z"/><path d="M12.4 7.8l1.8 1.8"/></svg>
<span>Penwick</span>
</span>
<span class="doc__file">Homepage / Headline</span>
</header>
<div class="tones" role="radiogroup" aria-label="Tone" data-tones>
<span class="tones__pill" data-pill aria-hidden="true"></span>
<button class="tone" type="button" role="radio" data-tone="0" aria-checked="true">Plain</button>
<button class="tone" type="button" role="radio" data-tone="1" aria-checked="false">Warm</button>
<button class="tone" type="button" role="radio" data-tone="2" aria-checked="false">Bold</button>
</div>
<div class="sheet" data-sheet>
<h1 class="line" data-line aria-live="polite"></h1>
<span class="caret" data-caret aria-hidden="true"></span>
</div>
<footer class="doc__bottom">
<span class="meta">
<span class="meta__diff" data-diff aria-live="polite"><span class="roll" data-plus>+0</span><span class="roll roll--minus" data-minus>−0</span><span class="meta__words">words</span></span>
<span class="meta__draft">Draft <span class="roll" data-draft>1</span> of 3</span>
</span>
<button class="accept" type="button" data-accept disabled>
<span class="accept__face" data-face>
<svg class="accept__check" viewBox="0 0 16 16" aria-hidden="true"><path data-checkpath d="M3.4 8.4 6.6 11.4 12.6 4.8"/></svg>
<span class="accept__label" data-label>Accept</span>
</span>
</button>
</footer>
</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.
25 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 “Tracked changes headline” from Animorio and fit it into my siteThe previous sentence and the new one are compared word by word with the longest common subsequence: equal words stay where they are, the others become an exit and an entry, in reading order. The words leaving stay in the headline, struck through, and the new ones are inserted right after, still empty and hidden, so the line does not move until they type.
Each word leaving gets an absolute orange bar at mid height with its transform-origin on the left: GSAP takes it from scaleX 0 to 1 in three tenths with power2.inOut, while the word turns grey and its --wd variable drops to minus 12, taking twelve points off the wdth axis of Mona Sans.
The new words are already split into letters with display none: a timeline shows them one at a time, each with a tween taking --lw from 240 to 0 and --ld from minus 10 to 0 with back.out, an extra weight that settles. The caret moves to the right edge of the last letter, read with getBoundingClientRect, and only blinks when it stops.
The headline has two CSS variables, --w and --d, used in font-variation-settings by every word and every letter. Each tone has its own values, 540 and 100, 460 and 108, 720 and 88: with Accept GSAP takes them to the new ones in nine tenths with power3.inOut, and all the letters change weight and width together.
The height of the headline changes with the struck and the new words: the container follows it with a tween on the height read from offsetHeight, recomputed at every word typed and on resize, so the sheet does not jump.
| Name | File | Default | What it changes |
|---|---|---|---|
TYPE | script.js | 0.034 | The seconds between one letter and the next as the new word types itself. |
STRIKE | script.js | 0.3 | The seconds of the orange line striking through a word that leaves. |
SETTLE | script.js | 240 | The extra weight each letter arrives with before it settles. |
HOLD | script.js | 1.5 | The seconds the changes stay marked before the pointer presses Accept. |
PAUSE | script.js | 1.6 | The seconds between one accepted tone and the next. |
ACCENT | script.js | #ff5b1f | The colour of the striking line, the caret and the wash behind the new words. |
For the opening of a writing app, an assistant that rewrites text or a copywriting tool: it shows in one gesture what the product does, changing the tone of a sentence and showing what changed before you accept it.
The same animation with adapted sizes: the headline is sized on the width and the height, the sheet takes almost the whole box, under 420 pixels the file name and the word words disappear, and the tones are picked with a finger.
No typing letters and no folding words: the struck words appear already struck, the new ones fade in, with Accept the old ones fade out and the headline takes the weight of the tone at once; there is no drawn pointer and the tones change by themselves.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.8 KB; the libraries: GSAP 28 KB.
Tested on 27 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.