Skip to content
animorio
IT
All components

Credit score card

Charts, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.4 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

14 values to change

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 “Credit score card” 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 white, a light card: at the top “Credit score” and a pill saying “Today”; below, the large score with the band’s name beside it, then the 300 to 850 scale in five bands, the score’s own lit in blue, a dark capsule marker and a thin mark that stays on today’s value; at the bottom three moves to tick, with their points. On opening, the score counts up from 300 and the marker runs to its place. Ticking “Pay 500 off the card”, the box fills and the tick is drawn, the number counts to 720 without overshooting and gets heavier for a moment, the marker arrives on a small spring and the pill rolls to “+18 points”. With “Six months paid on time” the score enters “Very good”: the name rolls, the new band lights up and jolts. “Open a new loan” takes it down. Unticking brings it back to today.

How it works

Two numbers for one move

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

Bands in proportion

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.

The number’s weight

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.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#4b5bffThe colour of the band the score falls in.
SCOREscript.js702Today’s score, from 300 to 850.
GLIDEscript.js0.8How many seconds the score takes to reach the new value.
HOLDscript.js1.7On its own: how many seconds it stops after each move.
LOOPscript.jstrueLeft alone, a pointer tries the three moves and then clears them.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

No counting, springs or rolls: score, marker, band and pill change at once.

Pitfalls

  • The moves’ points are made up: a real simulator asks whoever computes the score and must say clearly that it is an estimate, not a promise.
  • The moves are buttons with aria-pressed and the score sits in an aria-live line; the band is not told by colour alone, there is the name.
  • The scale runs 300 to 850 like the most common ones in the United States: other countries use different scales, so bands and ends must change.

Libraries

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.

Testing

Tested on 17 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