Skip to content
animorio
IT
All components

Eligibility check button

Buttons, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.1 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On black, a light pill 60 pixels tall with a ticked shield and “Check eligibility”; on mouse hover the shield wobbles. On tap the button presses in slightly, widens on a spring and turns dark with a light edge: inside, three requirements appear in a row, “Enrolled”, “GPA 3.6”, “On time”, each with its small ring. One at a time the ring lights up, an arc turns around it, then a green tick draws itself in its place and the requirement gives a small jump. After the third, the button narrows on a spring, turns green, the large tick draws itself and the text says “Eligible for $4,000”, the amount counting from zero and a sheen crossing the pill. Another tap takes it back to the start.

How it works

Three faces, one on top of the other

The 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.

The width on a spring

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.

One requirement at a time

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.

The outcome

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.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#3ddc97The colour of the positive outcome and of the ticks.
STEPscript.js0.75How many seconds the check of each requirement lasts.
AMOUNTscript.js4000The scholarship amount the button says at the end.
SPRINGscript.js1How much the button bounces when it changes width.
LOOPscript.jstrueLeft alone, the demo’s pointer runs the check and then starts again.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

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.

Pitfalls

  • During the check the button has aria-busy and takes no more taps; an aria-live region says what is being checked and then the outcome, and once the check is over the button’s label becomes “Eligible for $4,000. Check again”.
  • The turning arc rotates around the centre of its svg (svgOrigin 9 9, the centre of the viewBox): with a transform-origin measured on the arc’s own box it would turn off-axis.
  • The three faces are absolute layers: if the hidden label stayed in the flow, the button could not narrow below its width.
  • Here the outcome is always positive and the requirements are invented: in a real product every check waits for its answer and one can fail, with a cross in place of the tick and the reason written out.

Libraries

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.

Testing

Tested on 29 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components