
The star rating
Ratings, SVG, Hover
A dark pill button for the settings of a developer app: pressed, the label rolls to the event name and a green light leaves the sign, runs along the top edge to the far end (the request) and comes back along the bottom (the answer), while a chip counts the milliseconds. When it lands, green floods the pill from the sign, the hook becomes a tick and the label says ‘200 OK’; after a moment it is ready to send again.
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>
<!--
"Send test webhook 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>Send test webhook button with a light running round the edge and the 200 that comes back</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 button that sends a test webhook: pressed, the label rolls to the event name and a light leaves the hook
sign, runs along the top edge to the right (the request) and comes back along the bottom (the answer) while
a small chip counts the milliseconds; when it lands the pill floods with green from the sign, the hook
becomes a tick and the label says 200 OK; after a moment it is ready to send again -->
<button class="hook" type="button" data-hook>
<span class="hook__body" aria-hidden="true">
<span class="hook__flood" data-flood></span>
<span class="hook__light"></span>
</span>
<span class="hook__edge" aria-hidden="true"></span>
<svg class="hook__run" data-run-box aria-hidden="true"><rect data-run pathLength="100"></rect><rect class="hook__run-glow" data-run-glow pathLength="100"></rect></svg>
<span class="sign" data-sign aria-hidden="true">
<svg viewBox="0 0 24 24">
<g data-sign-hook>
<path d="M9.2 8.6a3.4 3.4 0 1 1 5.9 2.2l2.6 4.5"></path>
<path d="M17.7 15.3a3.4 3.4 0 1 1-3.4 3.4H8.6"></path>
<path d="M8.6 18.7a3.4 3.4 0 1 1-2.2-5.9l2.9-4.6"></path>
</g>
<path class="sign__tick" data-sign-tick pathLength="1" d="M6.4 12.6 10.4 16.6 17.8 8"></path>
</svg>
</span>
<span class="label"><span class="label__word" data-word>Send test webhook</span></span>
<span class="time" data-time aria-hidden="true"><span data-ms>0</span> ms</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.
17 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 “Send test webhook button” from Animorio and fit it into my siteOver the pill sits an SVG rectangle as big as the pill, with round corners and pathLength 100: its path starts top left and goes clockwise. The light is a dash 13 hundredths long, moved with stroke-dashoffset; a thicker blurred copy makes the glow.
From the pill’s size the code works out at what percentage of the path the two round ends fall. The light goes from the left end to the right one along the top, stays there for 12% of the time and comes back along the bottom: three tweens on the same variable, in one timeline.
The milliseconds chip is measured once at its natural width and opens from zero with elastic.out; the number rises linearly to LATENCY in 86% of the trip, so it reaches the value a moment before the answer.
A green circle bigger than the pill, centred on the sign and clipped by the body, scales from 0 to 1: the colour seems to come out of the sign. The hook shrinks and goes, the tick draws itself with stroke-dashoffset, the label rolls to ‘200 OK’.
After HOLD seconds the button goes back to its first state by itself: it is an action, not a switch. A click while the light is running does nothing; a click on the answer starts another send at once.
| Name | File | Default | What it changes |
|---|---|---|---|
EVENT | script.js | POST order.created | What is sent: read while the light runs. |
ANSWER | script.js | 200 OK | The answer that comes back. |
LATENCY | script.js | 84 | The milliseconds counted in the chip. |
ACCENT | script.js | #19b36b | The colour of the good answer. |
TRIP | script.js | 1.5 | How many seconds the light’s trip takes, out and back. |
SPRING | script.js | 0.8 | How long the spring of the milliseconds chip lasts, in seconds. |
HOLD | script.js | 2.4 | How many seconds the answer stays before the button is ready again. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
For the integrations or webhooks page of a developer app, an online shop or an automation tool: the button that sends a test event and shows at once whether the address answers. Also good for ‘Test connection’ or ‘Ping’.
The same button: the pill takes at most the screen width minus the margins and the long label is cut with an ellipsis. The light’s edge is measured again at every change of width.
No running light and no springs: the label changes with a fade, the chip appears already open with the number written, the green and the tick fade in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.2 KB; the libraries: GSAP 28 KB.
Tested on 13 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.