
The star rating
Ratings, SVG, Hover
A dark pill button for the end of an article: a tap is one clap, holding it down brings claps faster and faster. At every clap the two hands meet and come back on a spring, golden dashes burst round them, a ring fills towards the maximum, the count on the right goes up and a bubble above says how many are yours. On release the bubble flies off and the label says thanks.
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>
<!--
"Hold to applaud 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>Applaud button to press and hold with the count that climbs</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">
<!-- an applause button for the end of an article: a tap is one clap, holding it down claps faster and faster; at
every clap the two hands meet and spring back, short lines burst round them, a ring fills towards the most
you can give, the count on the right goes up and a small bubble above says how many are yours -->
<button class="clap" type="button" data-clap aria-label="Applaud this article">
<span class="clap__body" aria-hidden="true"><span class="clap__warm" data-warm></span><span class="clap__light"></span></span>
<span class="clap__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg class="seat__ring" viewBox="0 0 54 54"><circle class="seat__track" cx="27" cy="27" r="25"></circle><circle class="seat__arc" data-ring cx="27" cy="27" r="25" pathLength="1"></circle></svg>
<svg class="seat__burst" data-burst viewBox="0 0 54 54"><path d="M27 4.5V0.5M9.6 10.4 6.8 7.6M44.4 10.4l2.8-2.8M3.8 25H0M54 25h-3.8"></path></svg>
<span class="seat__disc">
<svg viewBox="0 0 24 24">
<g data-hand="l"><rect x="3.2" y="11.4" width="3.8" height="5.8" rx="1.9" transform="rotate(-26 5.1 14.3)"></rect><rect x="6.2" y="5.4" width="5.4" height="13.4" rx="2.7"></rect><path d="M8.9 8.6v3.2"></path></g>
<g data-hand="r"><rect x="17" y="11.4" width="3.8" height="5.8" rx="1.9" transform="rotate(26 18.9 14.3)"></rect><rect x="12.4" y="5.4" width="5.4" height="13.4" rx="2.7"></rect><path d="M15.1 8.6v3.2"></path></g>
</svg>
</span>
</span>
<span class="label"><span class="label__word" data-word>Applaud</span></span>
<span class="total"><span data-total>248</span></span>
<span class="mine" data-mine aria-hidden="true"><span data-mine-n>+1</span></span>
</button>
<p class="sr" data-live aria-live="polite"></p>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.
16 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 “Hold to applaud button” from Animorio and fit it into my siteclap() does everything for a single clap: the two SVG groups of the hands rotate from OPEN degrees to zero in 70 milliseconds and return with elastic.out; the dashes scale from 0.72 to 1.16 and fade; number, bubble and ring advance by one.
On pointerdown the first clap goes and a gsap.delayedCall prepares the next: the wait starts at SLOW and at every clap is multiplied by 0.84, down to FAST. On release the pending call is cancelled.
One variable, from 0 to 1 (your claps divided by MAX), drives the ring, the golden veil inside the pill and the coloured shadow below: the more you clap, the more the button lights up.
The bubble comes in once on a spring, then only jolts at each clap. Seven tenths of a second after the last clap a timeline changes the label to THANKS, makes the bubble rise and fade and puts the first label back.
Space and Enter do the same: keydown starts (ignoring the key’s auto-repeat), keyup ends.
| Name | File | Default | What it changes |
|---|---|---|---|
TOTAL | script.js | 248 | The claps the article already has. |
MAX | script.js | 30 | How many claps one person can give. |
SLOW | script.js | 0.3 | Holding down: the seconds between the first claps. |
FAST | script.js | 0.07 | Holding down: the seconds between claps at full speed. |
ACCENT | script.js | #ffc94d | The colour of the applause. |
OPEN | script.js | 18 | By how many degrees the hands are open at rest. |
THANKS | script.js | Thank you | The label after the applause. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
At the bottom of an article on a blog, an online magazine or a newsletter, instead of the usual like: readers can say how much they liked it, not just whether. Also good under a portfolio project or a recipe.
The same button, to hold with a finger: the long-press menu is turned off on the button and the text cannot be selected. No light following the pointer.
The hands do not move and the dashes do not burst: at each clap only the number, the bubble (with a fade) and the ring change. The pill does not squeeze.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.6 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.