Skip to content
animorio
IT
All components

Live cricket scoreboard

Cards, Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 11 KBGSAP 28 KBFreeDownload the zip

The live score card of a sports app, in smoked glass over two soft lights in the team colours, like a Dribbble shot: the last overs of a T20 cricket final. Ball by ball the digits of the score and of the overs roll on a spring, the ball lands as a chip in This over and the line of commentary drops into the list pushing the old one down; a four or a six sends a band of light across the glass, a wicket flushes it red. Match stats opens the card: win probability and three tiles that keep rolling.

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>
<!--
  "Live cricket scoreboard" 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>The live cricket scoreboard that opens into the stats</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" data-stage>
    <!-- two soft team lights behind the glass: mint for the side batting, amber for the side bowling -->
    <span class="aura aura--bat" data-aura-bat aria-hidden="true"></span>
    <span class="aura aura--bowl" data-aura-bowl aria-hidden="true"></span>

    <div class="wrap" data-wrap>
      <article class="score" data-card aria-label="Live score">
        <span class="score__light" aria-hidden="true"></span>
        <span class="score__rim" aria-hidden="true"></span>
        <span class="score__tint" data-tint aria-hidden="true"></span>
        <span class="score__sweep" aria-hidden="true"><span class="score__sweep-band" data-sweep></span></span>

        <div class="score__body" data-body>
          <header class="score__head">
            <span class="live" data-live-chip>
              <svg class="live__icon" viewBox="0 0 16 16" aria-hidden="true"><path d="M5.2 5.2a4 4 0 0 0 0 5.6M10.8 5.2a4 4 0 0 1 0 5.6M3.2 3.2a6.8 6.8 0 0 0 0 9.6M12.8 3.2a6.8 6.8 0 0 1 0 9.6"/><path class="live__core" d="M8 7.1v1.8"/></svg>
              <span class="live__word" data-live-word>Live</span>
            </span>
            <span class="score__match">Harbour Cup final · T20</span>
          </header>

          <div class="team team--bat" data-bat>
            <span class="crest crest--bat" aria-hidden="true"><span data-bat-letter>K</span></span>
            <span class="team__names">
              <span class="team__name" data-bat-name>Kites</span>
              <span class="team__sub">Batting · chasing</span>
            </span>
            <span class="team__figures">
              <span class="team__score roll" data-roll="score">168/4</span>
              <span class="team__overs"><span class="roll" data-roll="overs">18.3</span> ov</span>
            </span>
          </div>

          <div class="team team--bowl">
            <span class="crest crest--bowl" aria-hidden="true"><span data-bowl-letter>F</span></span>
            <span class="team__names"><span class="team__name team__name--small" data-bowl-name>Falcons</span></span>
            <span class="team__line" data-bowl-line>176/8 · 20 ov</span>
          </div>

          <p class="need"><span class="need__words" data-need>Need 9 off 9 balls</span></p>

          <div class="over">
            <span class="over__label">This over</span>
            <span class="over__balls" data-balls>
              <span class="ball"><span class="ball__chip"></span></span>
              <span class="ball"><span class="ball__chip"></span></span>
              <span class="ball"><span class="ball__chip"></span></span>
              <span class="ball"><span class="ball__chip"></span></span>
              <span class="ball"><span class="ball__chip"></span></span>
              <span class="ball"><span class="ball__chip"></span></span>
            </span>
          </div>

          <ol class="feed" data-feed aria-label="Ball by ball"></ol>

          <div class="stats" data-stats id="match-stats">
            <div class="stats__inner">
              <div class="prob" data-stat>
                <div class="prob__labels">
                  <span><span data-prob-bat-name>Kites</span> <b class="roll" data-roll="probBat">62</b>%</span>
                  <span class="prob__title">Win probability</span>
                  <span><b class="roll" data-roll="probBowl">38</b>% <span data-prob-bowl-name>Falcons</span></span>
                </div>
                <div class="prob__bar"><span class="prob__fill" data-prob-fill></span></div>
              </div>
              <div class="tiles">
                <div class="tile" data-stat><span class="tile__label">Run rate</span><span class="tile__value roll" data-roll="rr">9.08</span></div>
                <div class="tile" data-stat><span class="tile__label">Required</span><span class="tile__value roll" data-roll="req">6.00</span></div>
                <div class="tile" data-stat><span class="tile__label">Partnership</span><span class="tile__value roll" data-roll="part">38 (24)</span></div>
              </div>
            </div>
          </div>

          <button class="toggle" type="button" data-toggle data-autoclic aria-expanded="false" aria-controls="match-stats">
            <span class="toggle__face" data-toggle-face>
              <span class="toggle__words" data-toggle-words>Match stats</span>
              <span class="toggle__knob"><svg class="toggle__chev" data-chev viewBox="0 0 16 16" aria-hidden="true"><path d="M4.5 6.5L8 10l3.5-3.5"/></svg></span>
            </span>
          </button>
        </div>
      </article>
    </div>
    <p class="sr" aria-live="polite" data-announce></p>
  </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.

44 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 “Live cricket scoreboard” 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 a near black page with a very fine grain, behind a card of smoked glass, two soft lights drift slowly: mint at the top left for the Kites, who are batting, amber at the bottom right for the Falcons. The card has a one pixel edge that catches the light at the top and a layered shadow under it. At the head the Live chip with a broadcast icon and the name of the match, Harbour Cup final · T20; then the Kites with their mint crest, 168/4 large and 18.3 ov, under a hairline the Falcons with their amber crest, 176/8 · 20 ov; then Need 9 off 9 balls, the This over row with six slots (the first three already filled: 1, 2, 0) and the ball by ball list with the last two lines. The match goes on by itself: at every ball the digits of the score and of the overs roll like an odometer and stop with a small bounce, the ball lands in its slot as a chip on a spring and the new line drops into the list from above pushing the others down, its tag swelling. A four and a six are mint and send a diagonal band of light across the glass while the mint light behind brightens; the wicket is red, flushes the card for an instant and shakes it by two pixels. When the over is done the chips fall away one after the other. With the final six the match is won: the score takes the mint colour with a glow, the crest gets a ring, Live becomes Result and the line says Kites won by 5 wickets. Match stats at the bottom opens the card: the list gives up a row, the chevron turns on a spring, and up come the win probability bar (mint against amber, with rolling percentages) and three glass tiles, Run rate, Required and Partnership, that keep rolling at every ball. With the mouse over it a light follows the pointer and the edge lights up where it passes. Until someone touches it, the card opens and closes the stats by itself.

How it works

Odometer digits

Every digit is a strip with the numbers 0 to 9 inside a window one digit tall, with a mask that fades at the top and bottom: to change it GSAP moves the strip by yPercent = -digit × 10 with a back.out, starting from the rightmost digit. When the shape of the number changes (6 (1) after 43 (26)) the text is rebuilt and the pieces rise one after the other.

The ball and the commentary

The ball is a chip inside its slot that arrives from scale 0.45 with a strong back.out; the new line goes on top of the list at height 0 and GSAP brings it to its height, so the others move down by themselves, while the content arrives from above on a spring and the tag swells. The oldest line dims and is removed at the end.

Glass and light

The card has backdrop-filter over two blurred lights that drift slowly; on the glass three layers: the light under the pointer and the edge that catches it (the same radial gradient, the second cut to one pixel with mask-composite), a red tint for the wickets and a diagonal band that crosses the card for fours and sixes.

Stats without measuring

The panel opens with grid-template-rows from 0fr to 1fr and the ball by ball list goes from two rows to one with a CSS transition: no heights measured in pixels, so it stays right even when the window changes halfway. The tiles arrive staggered on a spring and the probability bar starts from zero.

The match on its own

A chain of gsap.delayedCall plays one ball every PACE seconds starting from the load event; the last ball wins, the card stays on the result for HOLD seconds, then fades and starts again. The first real touch only stops the automatic opening of the stats: the match goes on.

Values to change

NameFileDefaultWhat it changes
BATTINGscript.jsKitesThe team chasing (its first letter goes on the crest).
BOWLINGscript.jsFalconsThe team that batted first.
TARGETscript.js177The runs needed to win: the card starts 9 short with 9 balls to go.
PACEscript.js2.4How many seconds pass between one ball and the next.
SPRINGscript.js1How springy the moves are: 0.4 calm, 2 very bouncy.
HOLDscript.js3.2How many seconds the result stays before the overs play again.
AUTOscript.jstrueThe card opens and closes the stats by itself until someone touches it.

Try them in the Playground

When to use it

For the app or site of a league, a club or a sports paper: the live score of a cricket match, but the same card holds football, basketball or tennis by changing the lines. It says at a glance who is winning, what is left and what just happened, and keeps the stats one tap away.

On phones

On the phone the card is 88% of the screen wide and its sizes follow the height too, so it opens into the stats without leaving the box; there is no hover, the light on the edge stays at the top and the rest is the same.

With reduced motion

Nothing moves: the digits change in place with a fade, the balls and the lines of commentary fade in, the band of light becomes an edge that lights up and the stats panel opens at once.

Pitfalls

  • The sixth ball of the over is written 18.6 in the commentary but the board already says 19.0: the line’s label comes from the ball just bowled, the overs from the total of balls.
  • The light band had a transform in the CSS and GSAP wiped it at the first tween: now GSAP sets both skewX and xPercent.
  • Measuring the panel’s height in pixels left it wrong when the card’s window changed height: it opens with grid-template-rows 0fr and 1fr, which needs no measuring.
  • The loop started when the script was read and the poster landed on different moments: it starts from the page’s load event.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP 28 KB.

Testing

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