
The elastic button
Buttons, Hover, Text
The button of a radio app for teams, on white: hold it and it turns red, the five bars follow the voice, a halo breathes with the volume and the time runs. On release the message rises to the channel chip and “Sent to 4” arrives; then a teammate answers and, while they talk, the button waits in blue. A press that is too short sends nothing.
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>
<!--
"Push-to-talk button" 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>Push-to-talk button</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 button of a team walkie-talkie app: hold it to talk to the channel, the bars follow the voice,
letting go sends the message up to the channel and a teammate answers -->
<div class="pt" data-pt>
<p class="pt__chan" data-chan><span class="pt__face" data-face aria-hidden="true">MK</span><b>Kitchen crew</b><span class="pt__on">4 on</span></p>
<div class="pt__well">
<span class="pt__halo" data-halo aria-hidden="true"></span>
<button class="pt__btn" type="button" aria-describedby="pt-hint" data-btn>
<svg class="pt__mic" data-mic viewBox="0 0 28 28" aria-hidden="true"><rect x="10.500" y="4" width="7" height="12.500" rx="3.500"></rect><path d="M7 13.500a7 7 0 0 0 14 0M14 20.500v3.500"></path></svg>
<span class="pt__bars" data-bars aria-hidden="true"><i></i><i></i><i></i><i></i><i></i></span>
</button>
<span class="pt__puff" data-puff aria-hidden="true"></span>
</div>
<p class="pt__hint" id="pt-hint"><span data-hint>Hold to talk</span></p>
<span class="pt__say" data-say aria-live="polite"></span>
</div>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></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.
14 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 “Push-to-talk button” from Animorio and fit it into my sitepointerdown starts a linear tween on one number, the seconds of talk, and captures the pointer; pointerup stops it and looks at how long it lasted.
On every frame a made-up level comes out of three sines of the time: the five bars read it with scaleY, each at its own pace, and the halo with scale.
Above MIN seconds a pill leaves the button’s centre and reaches the channel chip, measured at that moment, which bounces; below MIN nothing leaves.
A delayed call turns on the “teammate talking” state: a class changes the colours, the halo pulses and the button ignores presses until it ends.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #ff5436 | The colour of the button while you talk. |
THEM | script.js | #2f7df6 | The colour used while a teammate talks. |
MIN | script.js | 0.4 | Below these seconds the press is too short and nothing is sent. |
REPLY | script.js | 2.2 | For how many seconds the answering teammate talks, in the demo (0 = no answer). |
SPRING | script.js | 1 | How much the button and the channel chip bounce: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer talks to the channel, listens to the answer and makes a press that is too short. |
In apps for people who work on their feet and talk by voice: kitchens and dining rooms, warehouses, building sites, shops, events, rescue. Also in a group chat or a game, where you talk by holding a key.
The same button, a 96 pixel disc in the middle: it has touch-action none, no text selection and no long-press menu, so the finger can rest on it for as long as you talk.
In place of the long press, one tap starts and another tap sends (“Tap to talk”). No dancing bars and no flying pill: only the colours and the words change. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.5 KB; the libraries: GSAP 28 KB.
Tested on 23 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.