
The elastic button
Buttons, Hover, Text
A credit score card with a “what if”: tick a move and the score counts to where it would land, the marker slides along the five-band scale leaving today’s mark behind, and when it changes band the name rolls and the new band lights up.
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>
<!--
"Credit score card" 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>Credit score card</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 credit score card with a "what if": tick a move and the score counts to where it would land,
the marker slides along the five bands away from today's mark, and the band's name changes when it crosses -->
<section class="cs" data-cs aria-label="Credit score">
<header class="cs__head">
<span class="cs__title">Credit score</span>
<span class="cs__delta" aria-hidden="true"><span data-delta></span></span>
</header>
<p class="cs__read" aria-live="polite">
<b class="cs__num" data-num>0</b>
<span class="cs__band"><span data-band></span></span>
</p>
<div class="cs__scale" aria-hidden="true">
<div class="cs__bar" data-bar></div>
<span class="cs__today" data-today></span>
<span class="cs__mark" data-mark><i></i></span>
<span class="cs__ends"><span>300</span><span>850</span></span>
</div>
<div class="cs__moves" data-moves role="group" aria-label="What if"></div>
</section>
<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.
14 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 “Credit score card” from Animorio and fit it into my siteThe written score and the marker’s position are two numbers: the first arrives with power2.out, so the digits never overshoot the value; the second with elastic.out, so the marker settles. Today’s mark does not move.
The five bands are flex items as wide as the points they cover (280, 90, 70, 60, 50). When the rounded score changes band, the new one takes the colour and jumps in scaleY with elastic.out.
While it counts, the number’s wght axis rises from 600 to 760 and back: a beat of weight instead of a bounce, which on a financial figure would look like a mistake.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #4b5bff | The colour of the band the score falls in. |
SCORE | script.js | 702 | Today’s score, from 300 to 850. |
GLIDE | script.js | 0.8 | How many seconds the score takes to reach the new value. |
HOLD | script.js | 1.7 | On its own: how many seconds it stops after each move. |
LOOP | script.js | true | Left alone, a pointer tries the three moves and then clears them. |
In the app of a bank, a card or a service that shows creditworthiness; and wherever a score on a banded scale is best explained by trying things: a site’s health, an energy class, a course level.
The same component: the number and the move rows shrink with the window’s height, rows stay at least 32 pixels tall and a long label is cut with an ellipsis.
No counting, springs or rolls: score, marker, band and pill change at once.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.4 KB; the libraries: GSAP 28 KB.
Tested on 17 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.