
The elastic button
Buttons, Hover, Text
An API’s rate limit as a twenty-segment meter. Each burst empties some while the big number drops, and time refills them one at a time. When there are not enough requests left the status turns “429 Too many”, the card shakes and tints red, and the button counts the seconds until a retry; then the segments fill again in a wave.
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>
<!--
"API rate limit meter" 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>API rate limit meter</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage">
<!-- an API's rate limit as a meter: every burst empties segments, time refills them one by one, and when
they run out the status turns 429 and a short wait counts down before everything fills again -->
<section class="rl" data-rl aria-label="API rate limit">
<header class="rl__head">
<div>
<h2>Rate limit</h2>
<p><span data-limit></span> requests per minute</p>
</div>
<span class="rl__status" data-statusbox><b data-status>200 OK</b></span>
</header>
<div class="rl__big"><b data-left></b><span>left</span></div>
<div class="rl__meter" data-meter role="meter" aria-label="Requests left" aria-valuemin="0"></div>
<button class="rl__send" type="button" data-send><span data-sendlabel></span></button>
<span class="rl__say" data-say aria-live="polite"></span>
</section>
<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.
16 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 “API rate limit meter” from Animorio and fit it into my siteOne number holds the requests really left, another what is displayed: at each burst the second chases the first on a tween, and segments and figure are drawn from it.
Each segment is worth three requests: its opacity and height are the share of that value still available, so the last one goes out halfway.
GSAP’s ticker adds, every frame, the requests earned in the time elapsed (REFILL per second), stopping at the limit and during the wait.
If there are not enough requests it goes to zero, a class changes one colour variable for card, pill and segments, and a linear tween counts the LOCK seconds before reopening.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #5eead4 | The colour of the full segments and the 200 status. |
LIMIT | script.js | 60 | How many requests per minute the limit allows. |
BURST | script.js | 18 | How many requests the button sends at each press. |
REFILL | script.js | 1.5 | How many requests become available again each second. |
LOCK | script.js | 3 | How many seconds to wait after a 429 before retrying. |
LOOP | script.js | true | Left alone, the demo’s pointer sends bursts until the 429 arrives and then waits. |
In an API’s dashboard, in the docs to explain the limit, on a plan’s usage page: wherever a quota is spent in bursts and refills with time.
The same card, 304 pixels wide at most: the twenty segments share whatever width there is, the number stays large and the button is 44 pixels tall.
Segments and number change at once at each burst, with no jolt and no wave; the pill and the button change their words without rolling and the seconds still count. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 4.8 KB; the libraries: GSAP 28 KB.
Tested on 22 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.