Skip to content
animorio
IT
Back to the library

Quiz show scoreboard

Transitions, TextGSAP, CSS onlyMediumCompressed weight: Demo 6.8 KBGSAP 28 KBFreeDownload the zip

The on-air graphics of a made-up TV quiz, Last Light, on near black with a single gold: the round comes in, the question and its four answers, the clock bar runs out, the right answer lights up with its tick, the scores roll digit by digit and the gold line slides onto the new leader. Then the lowest score goes dark, «Eliminated» writes itself letter by letter, the row leaves the line and the others close the gap on a spring. Minimal style, GSAP.

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>
<!--
  "Quiz show 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>Quiz show scoreboard</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/jetbrains-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the on-air graphics of an invented TV quiz, Last Light: the round comes in, the question, the clock running out,
       the right answer lighting up, the scores rolling digit by digit, then the lowest score goes dark, «Eliminated»
       writes itself, the row leaves the line and the others close the gap on a spring -->
  <main class="stage" data-stage>
    <section class="panel" data-panel aria-label="Last Light, round three">
      <span class="panel__glare" data-glare aria-hidden="true"></span>

      <header class="top">
        <p class="show" data-in>
          <svg class="show__mark" viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="8.2" /><path d="M10 1.8 V 10 L 15.4 13.2" /></svg>
          Last Light
        </p>
        <p class="round" data-in><span class="round__mask"><span class="round__text" data-round>Round 3</span></span></p>
      </header>

      <div class="question" data-in>
        <p class="question__text" data-question>Which planet has the shortest day?</p>
        <ul class="answers" data-answers>
          <li class="answer"><span>Mercury</span></li>
          <li class="answer"><span>Venus</span></li>
          <li class="answer answer--right" data-right>
            <svg class="answer__tick" viewBox="0 0 14 14" aria-hidden="true"><path d="M2.6 7.4 L 5.7 10.3 L 11.4 3.8" pathLength="1" /></svg>
            <span>Jupiter</span>
          </li>
          <li class="answer"><span>Mars</span></li>
        </ul>
        <div class="clock" aria-hidden="true">
          <span class="clock__bar" data-clock></span>
        </div>
      </div>

      <ol class="board" data-board aria-label="Scores">
        <span class="board__lead" data-lead aria-hidden="true"></span>
        <li class="row" data-row data-name="Mara Quist" data-from="1450" data-to="1450">
          <span class="row__in">
            <span class="row__seal">MQ</span>
            <span class="row__name">Mara Quist</span>
            <span class="row__gain" data-gain></span>
            <span class="row__score" data-score aria-label="1450"></span>
          </span>
        </li>
        <li class="row" data-row data-name="Rafael Ortiz" data-from="1240" data-to="1640">
          <span class="row__in">
            <span class="row__seal">RO</span>
            <span class="row__name">Rafael Ortiz</span>
            <span class="row__gain" data-gain>+400</span>
            <span class="row__score" data-score aria-label="1240"></span>
          </span>
        </li>
        <li class="row" data-row data-name="Tove Aalto" data-from="1180" data-to="1180" data-out>
          <span class="row__in">
            <span class="row__seal">TA</span>
            <span class="row__name">Tove Aalto</span>
            <span class="row__out" data-out-label aria-hidden="true"></span>
            <span class="row__score" data-score aria-label="1180"></span>
          </span>
        </li>
        <li class="row" data-row data-name="Ilya Benn" data-from="1320" data-to="1520">
          <span class="row__in">
            <span class="row__seal">IB</span>
            <span class="row__name">Ilya Benn</span>
            <span class="row__gain" data-gain>+200</span>
            <span class="row__score" data-score aria-label="1320"></span>
          </span>
        </li>
      </ol>
    </section>
  </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.

34 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 “Quiz show 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

The dark panel of Last Light, a made-up TV quiz, with a single gold. At the top the show name with a small dial and «Round 3», rising from its mask. Below, the question, «Which planet has the shortest day?», and four answers in pills that come in one after another with a small bounce. The clock bar runs out in just over three seconds and turns gold on the last stretch; when it is done the wrong answers step back and Jupiter lights up in gold, grows for a moment and its tick draws itself. On the board four contestants, each with initials in a circle, a name and a four-digit score: those who got it right see «+400» or «+200» rise and their score rolls, digit by digit from the right, going a pixel too far before it stops. The gold line on the left edge slides onto the new leader. Then the lowest score goes grey, «Eliminated» writes itself letter by letter, the row slides away and the rows below rise to close the gap on a spring. Now and then a sheen crosses the panel. Then everything steps back and the round starts again.

How it works

The digit reels

Each score is four reels, a strip from 0 to 9 inside a window one line tall: to show a digit the strip moves up a tenth per digit. Only the digits that change roll, from the right, seven hundredths apart, with a back.out that goes a pixel too far.

The clock and the answer

The clock bar is a scaleX from one to zero, linear; at 70% it turns gold. When it ends the wrong answers drop to 0.4 and the right one turns gold, grows by 6% and comes back, while the tick, a path at pathLength 1, draws itself.

The leader line

A two-pixel gold line sits on the edge of the leader’s row: its position is read from the row’s offsetTop when the tween starts, so it holds at any size, and it slides with a back.out.

The eliminated player

The lowest score after the answer goes dark, opacity and saturation down; «Eliminated» writes itself by counting letters on an animated object. The row leaves to the left and then drops out of the flow: the rows below start one row height plus the gap lower and come back to zero on a spring.

The loop

Each round is a fresh timeline that starts from a clean state and, when it ends, starts the next: no setTimeout, everything on GSAP’s clock.

Values to change

NameFileDefaultWhat it changes
SPEEDscript.js1Speed of the whole round.
ROUNDscript.js3The round number.
QUESTION_TIMEscript.js3.2Seconds on the clock bar.
ROLLscript.js0.9Duration of the digit roll.
OVERSHOOTscript.js1.6How far the digits overshoot before stopping.
SPRINGscript.js2.2Strength of the spring of the rows closing the gap.
GLAREscript.js5Seconds between sheens (0 never).
HOLDscript.js2.4Seconds held at the end of the round.

Try them in the Playground

When to use it

For the graphics of a live quiz or contest, an event leaderboard, a tournament, a pub quiz night or a game inside an app.

On phones

The same panel with sizes fitted to the height: the answers wrap onto two lines, the board rows are sized on the screen height.

With reduced motion

No rolling and no springs: the board fades in already settled, with the right answer lit, the new scores and the eliminated player dimmed.

Pitfalls

  • Digits must be fixed width (tabular-nums), otherwise the score jitters as it rolls.
  • The eliminated row leaves the flow only after it has gone, and the rows below start offset by the same amount: no jump is seen.
  • The leader line’s position is read when the tween starts, not once: with the window resizing, a saved position ends up off the row.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, JetBrains Mono (font variabile) 5.3.0.

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

Testing

Tested on 1 December 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 animations