
The elastic button
Buttons, Hover, Text
The reactions under a chat message, on black: three pills with a drawn icon and a count, plus one to add another. Resting on one, a smoked glass tooltip rises and tells who reacted: the faces slide in one after the other, overlapping, then the names, «Mara, Jonah and 10 others reacted with» and the little icon. Moving to the next reaction the tooltip does not close: it stretches or narrows to its new width on a spring, its tail glides to the new pill and the faces change. Tapping a reaction adds yours: the icon pops with a small burst of strokes, the count rolls up and your face enters at the front of the row pushing the others along; tap again and you leave.
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>
<!--
"Reactions tooltip" 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 reactions tooltip that tells who reacted, with the faces sliding in</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 reactions under a chat message, on black. Resting on a reaction, a tooltip rises and tells who reacted:
the faces slide in one by one and the names follow. Moving to another reaction, the tooltip stretches to its
new width and the faces change places. Tapping a reaction adds yours: the icon pops, the count rolls and your
face takes the front of the row in the tooltip -->
<div class="kit" data-kit>
<div class="tip" id="reactors" role="tooltip" data-tip>
<div class="tip__in" data-tip-in>
<div class="tip__faces" data-faces aria-hidden="true"></div>
<div class="tip__words">
<p class="tip__who" data-who></p>
<p class="tip__how"><span data-how>reacted with</span><span class="tip__icon" data-tip-icon aria-hidden="true"></span></p>
</div>
</div>
<svg class="tip__tail" data-tail viewBox="0 0 18 9" aria-hidden="true">
<path class="tip__tail-fill" d="M0 0h18L10.4 7.6a2 2 0 0 1-2.8 0z"/>
<path class="tip__tail-edge" d="M0.5 0.5L7.6 7.6a2 2 0 0 0 2.8 0L17.5 0.5"/>
</svg>
</div>
<div class="bar" role="group" aria-label="Reactions" data-bar>
<button class="chip" type="button" data-chip="fire" aria-pressed="false" aria-describedby="reactors">
<span class="chip__light" aria-hidden="true"></span>
<span class="chip__icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M12.3 3.2c.5 3-1.6 4.4-3 6.3-1 1.3-1.7 2.8-1.7 4.6a5.4 5.4 0 0 0 10.8.2c0-2.4-1.2-4.1-2.4-5.3.1 1.6-.5 2.7-1.5 3.3.4-3.2-.4-6.6-2.2-9.1z"/><path class="ic-in" d="M12 20.2a2.6 2.6 0 0 1-2.6-2.6c0-1.6 1.4-2.4 2.1-3.7.4 1 1.8 1.6 2.6 2.7.4.5.5 1 .5 1.2a2.6 2.6 0 0 1-2.6 2.4z"/></svg>
</span>
<span class="chip__n" data-n aria-label="12 reactions"><span class="num" data-num>12</span></span>
<span class="chip__burst" data-burst aria-hidden="true"></span>
</button>
<button class="chip" type="button" data-chip="thumbs" aria-pressed="false" aria-describedby="reactors">
<span class="chip__light" aria-hidden="true"></span>
<span class="chip__icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M7.5 10.5v9h-3v-9z"/><path d="M7.5 19.5h9.1a2 2 0 0 0 2-1.6l1.1-5.4a2 2 0 0 0-2-2.4h-4.4l.6-3.4a1.8 1.8 0 0 0-3.3-1.3l-3.1 5.1"/></svg>
</span>
<span class="chip__n" data-n aria-label="8 reactions"><span class="num" data-num>8</span></span>
<span class="chip__burst" data-burst aria-hidden="true"></span>
</button>
<button class="chip" type="button" data-chip="eyes" aria-pressed="false" aria-describedby="reactors">
<span class="chip__light" aria-hidden="true"></span>
<span class="chip__icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><ellipse cx="8" cy="12" rx="3.6" ry="5.2"/><ellipse cx="16" cy="12" rx="3.6" ry="5.2"/><circle class="ic-dot" cx="9" cy="13.2" r="1.5"/><circle class="ic-dot" cx="17" cy="13.2" r="1.5"/></svg>
</span>
<span class="chip__n" data-n aria-label="3 reactions"><span class="num" data-num>3</span></span>
<span class="chip__burst" data-burst aria-hidden="true"></span>
</button>
<span class="bar__rule" aria-hidden="true"></span>
<button class="chip chip--add" type="button" aria-label="Add reaction" data-add>
<span class="chip__light" aria-hidden="true"></span>
<span class="chip__icon" aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M19.6 12.6A7.6 7.6 0 1 1 11.4 4.4"/><path d="M8.8 14.4c.8 1.1 1.9 1.7 3.2 1.7s2.4-.6 3.2-1.7"/><circle class="ic-dot" cx="9.2" cy="10.2" r="1"/><circle class="ic-dot" cx="14.8" cy="10.2" r="1"/><path d="M18.5 3.2v5M16 5.7h5"/></svg>
</span>
</button>
</div>
<svg class="pointer" data-pointer viewBox="0 0 20 24" aria-hidden="true"><path d="M2.2 1.6l15 11.2-6.6 1.1 3.7 7.3-2.6 1.3-3.7-7.3-4.9 4.6z"/></svg>
</div>
</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.
22 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 “Reactions tooltip” from Animorio and fit it into my siteThere is one tooltip for all the reactions. If it is already open, on change the old width is read, the new words are written, the new width is read and GSAP goes from one to the other with back.out; meanwhile the x of the tooltip and of the tail move under the centre of the new pill, kept inside the screen.
Every face knows its name: when you add your reaction the ones that stay are not redrawn but slide to their new place, yours enters at the front from below and the extra one leaves. So the row seems to make room instead of flashing.
The count sits in a one-line window: the old number leaves upwards (or downwards, if you remove the reaction) and the new one arrives from the other side with back.out, in tabular figures so the pill does not change width.
The first tooltip waits DELAY seconds, so it does not open when you just pass over; the next ones open at once, until the pointer leaves the reactions for more than GRACE seconds.
| Name | File | Default | What it changes |
|---|---|---|---|
DELAY | script.js | 0.35 | The seconds on a reaction before the first tooltip opens. |
GRACE | script.js | 0.2 | The seconds the tooltip waits before closing when the pointer leaves. |
SPRING | script.js | 1.5 | How far the tooltip and the faces overshoot when they arrive. |
STAGGER | script.js | 0.06 | The seconds between one face and the next as they slide in. |
FACES | script.js | 4 | How many faces the tooltip shows at most. |
OVERLAP | script.js | 0.24 | How much each face covers the one before. |
BURST | script.js | 6 | How many strokes fly out of the icon when you add your reaction. |
IDLE | script.js | 2.5 | The seconds without touching anything before the drawn arrow starts again. |
LOOP | script.js | true | The drawn arrow does the round again by itself. |
--accento | style.css | #7b93ff | The blue of your reaction and of your face. |
For the reactions of a messaging app, a forum, blog comments or a team workspace: wherever a number next to an icon hides people and it helps to say who they are without opening a window.
Without hover, a tap adds or removes your reaction and opens the tooltip at once, which closes by itself after a little over two seconds or with a tap outside; the tooltip always stays inside the screen.
No jumps or springs: the tooltip, the faces and the words fade in and out, the count changes in place, the icon does not pop and there are no strokes.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.2 KB; the libraries: GSAP 28 KB.
Tested on 14 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.