
The elastic button
Buttons, Hover, Text
The “Check eligibility” button of a scholarship: on tap it widens, turns dark and checks the three requirements inside itself, one after the other, each with its small ring turning and then a green tick. When the check ends it narrows, turns green and says “Eligible for $4,000”, the amount counting up and a sheen crossing it.
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>
<!--
"Eligibility check 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>Eligibility check 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 Check eligibility button of a scholarship: the three requirements are checked one after
the other inside the button, then it gives the outcome with the amount -->
<button class="el" type="button" data-el data-state="rest">
<span class="el__face" data-face="rest"><svg class="el__icon" data-icon viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.300 16 4.600v4.700c0 3.700-2.500 6.700-6 8.200-3.500-1.500-6-4.500-6-8.200V4.600Z"></path><path d="m7.300 10 2 2 3.500-4"></path></svg><span>Check eligibility</span></span>
<span class="el__face el__face--checks" data-face="checks" aria-hidden="true">
<span class="el__req" data-req><svg viewBox="0 0 18 18"><circle class="el__ring" cx="9" cy="9" r="7"></circle><circle class="el__arc" data-arc cx="9" cy="9" r="7" pathLength="1"></circle><path class="el__ok" data-ok pathLength="1" d="m5.600 9.300 2.300 2.300 4.600-5.200"></path></svg><span>Enrolled</span></span>
<span class="el__req" data-req><svg viewBox="0 0 18 18"><circle class="el__ring" cx="9" cy="9" r="7"></circle><circle class="el__arc" data-arc cx="9" cy="9" r="7" pathLength="1"></circle><path class="el__ok" data-ok pathLength="1" d="m5.600 9.300 2.300 2.300 4.600-5.200"></path></svg><span>GPA 3.6</span></span>
<span class="el__req" data-req><svg viewBox="0 0 18 18"><circle class="el__ring" cx="9" cy="9" r="7"></circle><circle class="el__arc" data-arc cx="9" cy="9" r="7" pathLength="1"></circle><path class="el__ok" data-ok pathLength="1" d="m5.600 9.300 2.300 2.300 4.600-5.200"></path></svg><span>On time</span></span>
</span>
<span class="el__face" data-face="done"><svg class="el__icon" viewBox="0 0 20 20" aria-hidden="true"><path data-tick pathLength="1" d="m4.600 10.500 3.600 3.600 7.200-8.200"></path></svg><span>Eligible for <b data-outsum>$4,000</b></span></span>
<i class="el__sheen" data-sheen aria-hidden="true"></i>
</button>
<span class="live" aria-live="polite" data-live></span>
<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 “Eligibility check button” from Animorio and fit it into my siteThe resting label, the three requirements and the outcome are three layers filling the button, each centred on its own: the hidden ones take no room, so nothing shifts what is visible.
Every state has its width in pixels, never wider than the screen. The button gets there on an elastic spring, and on resize it is recomputed without animating.
A timeline calls the check and then the result for every requirement, STEP seconds apart. The arc is a circle with a short dash rotating around the centre of its svg; the tick draws itself with stroke-dashoffset.
When the check ends an attribute on the button changes (the green comes from it), the amount counts from zero on an animated number and a band of light crosses the pill once.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #3ddc97 | The colour of the positive outcome and of the ticks. |
STEP | script.js | 0.75 | How many seconds the check of each requirement lasts. |
AMOUNT | script.js | 4000 | The scholarship amount the button says at the end. |
SPRING | script.js | 1 | How much the button bounces when it changes width. |
LOOP | script.js | true | Left alone, the demo’s pointer runs the check and then starts again. |
On the page of a scholarship, a grant or a benefit, before the real form: the reader knows at once whether filling it in is worth it. The same button with its three checks carries a pre-approval (“can I get the mortgage?”), a delivery area’s coverage, a device’s compatibility or the checks before a release.
The button is 60 pixels tall and 228 to 296 wide depending on its state, never more than the screen minus the margins; below 330 pixels the three requirements tighten. With a finger the tap is what counts: the shield’s wobble is for the mouse only.
The button changes width and face with no springs or slides; the small rings do not turn, the three ticks appear one after the other already drawn and the amount is written at once, without counting. No sheen. The demo’s pointer does not start.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.1 KB; the libraries: GSAP 28 KB.
Tested on 29 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.