
Modular share menu
Menus, Transitions, Hover, Text
A message in the team chat of Juniper, an invented work app, on a white card with soft shadows. Under the bubble the edges of its earlier versions peek out like a small stack of paper. Ana edits the message: the changed words leave upwards and the new ones roll in letter by letter, the bubble grows on a spring and a band of light crosses it, the edit time and the number of versions roll forward and a new edge slides out from under it. Tapping Edited, the stack springs open into the version history, with the added words highlighted and the removed ones struck through; choosing a version, a violet frame jumps onto it and in the bubble a marker sweeps over the words that changed since then.
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>
<!--
"Edited message history" 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 edited message with the version history</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 message in the team chat of Juniper, an invented work app. Under the bubble the edges of its earlier
versions peek out like a small stack of paper. When the message is edited the changed words roll in, the
edit time rolls forward and a new edge slides out; tapping Edited unfolds the stack into the version
history, and choosing a version marks in the bubble the words that changed since then -->
<section class="chat" data-chat aria-label="Message in launch-room">
<header class="chat__head">
<svg class="chat__hash" viewBox="0 0 16 16" aria-hidden="true"><path d="M6.2 2.5 5 13.5M11 2.5 9.8 13.5M2.8 6h11M2.2 10h11"/></svg>
<span class="chat__room">launch-room</span>
<span class="chat__members">12 members</span>
</header>
<article class="msg">
<span class="msg__avatar" aria-hidden="true"><span>AK</span></span>
<div class="msg__main">
<p class="msg__who"><span class="msg__name">Ana Kovac</span><span class="msg__role">Design lead</span><span class="msg__time">10:31</span></p>
<div class="bubble-wrap" data-wrap>
<span class="peek" data-peek aria-hidden="true"></span>
<span class="peek" data-peek aria-hidden="true"></span>
<div class="bubble" data-bubble>
<p class="bubble__text" data-text></p>
<span class="bubble__glint" data-glint aria-hidden="true"></span>
</div>
</div>
<div class="msg__meta">
<button class="edited" type="button" data-edited data-autoclic aria-expanded="false" aria-controls="history">
<svg class="edited__pen" viewBox="0 0 16 16" aria-hidden="true">
<path data-pen pathLength="1" d="M10.6 2.9l2.5 2.5-7.4 7.4-3.1.6.6-3.1z M9.2 4.3l2.5 2.5"/>
</svg>
<span class="edited__word">Edited</span>
<span class="edited__at roll" data-at></span>
<svg class="edited__caret" viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.5 8 10l3.5-3.5"/></svg>
</button>
<span class="msg__count"><span class="roll" data-count></span> <span data-count-word>earlier version</span></span>
</div>
<div class="hist" id="history" data-hist inert>
<div class="hist__list" data-list role="listbox" aria-label="Earlier versions">
<span class="hist__sel" data-sel aria-hidden="true"></span>
</div>
<p class="hist__note" data-note>Choose a version to compare</p>
</div>
</div>
</article>
</section>
<p class="sr" aria-live="polite" data-live></p>
</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.
27 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 “Edited message history” from Animorio and fit it into my siteThe versions are three sentences. A longest common subsequence (LCS) function on the words says which stay, which leave and which come in: the same function builds the history rows (span for additions, s for removed words) and picks the words to highlight in the bubble when a version is compared.
The removed words rise with a little blur; then the words are rebuilt keeping the ones that stay, and the new ones are split into letters that come in from below with a rotation on the X axis and a 50 ms stagger. The bubble's height is measured before and after and the spring takes it from one to the other, then it goes back to auto.
The edges under the bubble are two absolute spans. On opening each history row starts from the position and width of its edge (translateY and scaleX measured with getBoundingClientRect, scaleY 0.4) and reaches its place on a spring, while the container grows from zero to its measured height; the text fades in after. Closing takes the path backwards.
The violet frame is a single element that springs from row to row (y and height from offsetTop and offsetHeight). The marker is a flat background-image on each word: GSAP animates background-size from 0% to 100%, and to remove it moves the origin to the right, so it leaves in the direction of reading.
Each digit of the time and the count is a column of twenty figures in a drum 1.2 em tall with a faded mask; GSAP takes it with yPercent to the right digit, always forwards, on the spring and with a small stagger between drums. A hand written damped spring is the ease of everything.
| Name | File | Default | What it changes |
|---|---|---|---|
BOUNCE | script.js | 0.72 | The springs: lower bounces more (0.5), higher settles without passing the mark (1). |
HOLD | script.js | 1.7 | The seconds the pilot stays on each version it compares. |
ROLL | script.js | 0.05 | The seconds between one letter and the next when the new words roll in. |
GLINT | script.js | 1 | How bright the band of light that crosses the edited bubble is. |
SPEED | script.js | 1 | The pilot's speed: 2 twice as fast, 0.5 half. |
LOOP | script.js | true | The edit and the history start again. |
For the chat of a work app, a back office, a project tool or a messaging app: it shows that a message was changed and lets you check what it said before, without opening another window. It also fits the comments of a shared document or a CMS, or as a feature showcase on a landing page.
The same animation with adapted sizes: the card is 92% of the screen wide, the bubble's text is sized on the height too, and the history rows are tapped with a finger; on a short screen the channel header hides, so the open history stays inside.
Nothing moves: the new text fades in, the numbers are already in place, the history opens and closes with a fade, the frame appears on the chosen row and the marker is already full.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.5 KB; the libraries: GSAP 28 KB.
Tested on 6 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.