
Button menu
Menus, Transitions, Text
The comment box of a made-up work app, Plinth, in a white card: type @ and the list of people opens under the caret, with initial avatars, name and role, filtering letter by letter with the matched part in bold and the rows leaving and reordering on a spring. With the arrows or the pointer the active-row bar slides; pick one and the name flies from the list into the text and lands as a soft blue pill, and the sentence goes on after it. Backspace on the pill first lights it up, then removes it; Comment lights up when there is text and posting sends the comment up into the thread above. Minimal style.
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>
<!--
"Mention composer" 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>Mention composer</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 comment box of a made-up work app, Plinth: type @ and a list of people opens under the caret, it filters
letter by letter, the chosen name flies into the text and becomes a soft pill. Comment posts it to the thread above -->
<div class="wrap" data-wrap>
<section class="card" data-card aria-label="Comments on Pricing page">
<header class="top">
<span class="doc">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M5.5 3.5h6l3 3v10h-9z"></path><path d="M11.5 3.5v3h3"></path><path d="M8 10.5h4.5M8 13h3"></path></svg>
<span>Pricing page</span>
</span>
<span class="count" aria-live="polite"><span class="count__label">Comments</span><span class="badge" data-badge><span class="badge__n" data-badge-n>1</span></span></span>
</header>
<div class="thread" data-thread role="list"></div>
<div class="composer" data-composer>
<div class="editor is-empty" data-editor contenteditable="true" role="combobox" aria-autocomplete="list"
aria-expanded="false" aria-controls="people" aria-label="Write a comment" aria-multiline="true"
spellcheck="false" data-placeholder="Reply, or @mention someone"></div>
<span class="caret" data-caret aria-hidden="true"></span>
<div class="tools">
<span class="tool" aria-hidden="true">
<svg viewBox="0 0 20 20"><circle cx="10" cy="10" r="3.2"></circle><path d="M13.2 10v1.3a2.2 2.2 0 0 0 4.4 0V10a7.6 7.6 0 1 0-3 6"></path></svg>
</span>
<span class="tool" aria-hidden="true">
<svg viewBox="0 0 20 20"><path d="M15.5 9.2l-5.6 5.6a3.4 3.4 0 0 1-4.8-4.8l6-6a2.3 2.3 0 0 1 3.2 3.2l-6 6a1.1 1.1 0 0 1-1.6-1.6l5.4-5.4"></path></svg>
</span>
<button class="send" type="button" data-send disabled>
<span class="send__bg" aria-hidden="true"></span>
<span class="send__label" data-send-label>Comment</span>
<svg class="send__tick" viewBox="0 0 16 16" aria-hidden="true"><path d="M3.6 8.4l2.9 2.8 5.9-6.2" pathLength="1" data-tick></path></svg>
</button>
</div>
</div>
</section>
<div class="people" id="people" role="listbox" aria-label="People" data-people>
<div class="people__bar" data-bar aria-hidden="true">
<svg viewBox="0 0 16 16"><path d="M12.5 3.5v4.2a1.8 1.8 0 0 1-1.8 1.8H4"></path><path d="M6.4 6.8L3.6 9.5l2.8 2.7"></path></svg>
</div>
<div class="people__rows" data-rows></div>
<p class="people__none" data-none>No one by that name</p>
</div>
</div>
<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.
23 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 “Mention composer” from Animorio and fit it into my siteThe field is a contenteditable with white-space pre-wrap; every mention is a span with contenteditable false, so the caret jumps it like a single letter and it can’t be split. On every input the text before the caret in its node is read and a regex, @ followed by letters at the start or after a space, says whether a query is open.
A Range over the at sign alone gives its rectangle: the list goes right below it, kept inside the edges, or above when there is no room below, and transform-origin falls on the at sign so the opening spring grows from the right spot. It is redone on resize.
All rows already exist and sit absolutely: the filter sorts them (first name starts, surname starts, name contains), gives each its y and GSAP takes them there with back.out; leaving rows fade, arriving ones rise eight pixels, and the list’s height follows on the same spring. The active-row bar is a single element sliding on y.
The real pill is inserted, invisible, and measured; a fixed copy starts from the name’s rectangle in the row and reaches it with x on power3.inOut and y on back.out, so it draws a small arc, while ground and colour go from black text to the blue pill. On arrival the swap and an elastic squash.
The comment is added to the thread at zero height and grows on a spring while the oldest folds away, so the card barely changes size; a copy of the text flies from the box to its line, measured every frame, and fades into the real text on arrival. The button draws its tick with strokeDashoffset and autoRound off.
| Name | File | Default | What it changes |
|---|---|---|---|
PEOPLE | script.js | Ravi Menon:Product manager | Maya Lindqvist:Product designer | Jun Park:Frontend engineer | Amara Osei:UX research | Marco Bellini:Engineering lead | Mateo Ruiz:iOS engineer | The people in the list, name:role, in recent order. |
MAX_ROWS | script.js | 4 | How many people the list shows at most. |
ROW_SPRING | script.js | 1.5 | How far the rows and the active-row bar overshoot and come back. |
FLY_TIME | script.js | 0.55 | How long the name’s flight from the list to the text lasts. |
TYPE_SPEED | script.js | 0.06 | The seconds between letters when the preview types by itself. |
KEEP | script.js | 2 | How many comments the thread above the box keeps showing. |
In the comments of a work app, a project manager, a document or design editor, a team chat, the comments of a dashboard or a blog with its authors.
The card takes the width with a margin, gaps and margins also follow the height with clamp; the list stays inside the edges and, when there is no room under the caret, opens above it. A tap picks the row like a click.
No flights or springs: the list appears and filters with fades, the pill appears in place, the comment fades into the thread and the preview does not type by itself.
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 21 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.