Skip to content
animorio
IT
Back to the library

Speaker timer

Text, HoverGSAP, CSS onlyMediumCompressed weight: Demo 5.2 KBGSAP 28 KBFreeDownload the zip

The timer the speaker sees from the stage. The less time is left, the narrower and heavier the digits get on the font’s variable axes; under two minutes they turn amber and “Wrap up” appears, at zero they turn red, shake their head and start counting the overtime. Three keys: one minute less, pause, one minute more.

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>
<!--
  "Speaker timer" 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>Conference speaker timer with the minutes that tighten and the signal to wrap up</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 timer a speaker sees from the stage: as the time runs out the digits get narrower and heavier on the
         variable axes, the colour goes from calm to "wrap up" to "time's up", then it counts the overtime -->
    <section class="tmr" data-tmr aria-label="Speaker timer">
      <header class="tmr__head">
        <span class="tmr__room">Main stage</span>
        <span class="tmr__state" data-state><span data-statetext>On time</span></span>
      </header>

      <p class="tmr__time" data-time role="timer" aria-live="off"><span class="tmr__sign" data-sign>+</span><span class="tmr__d" data-m1></span><span class="tmr__d" data-m2></span><span class="tmr__colon">:</span><span class="tmr__d" data-s1></span><span class="tmr__d" data-s2></span></p>
      <div class="tmr__line" aria-hidden="true"><span data-line></span></div>

      <footer class="tmr__foot">
        <span class="tmr__talk">Design systems that age well<i>Noor Halvorsen</i></span>
        <span class="tmr__keys">
          <button type="button" data-less aria-label="One minute less"><svg viewBox="0 0 14 14" aria-hidden="true"><path d="M3 7h8"></path></svg></button>
          <button type="button" data-toggle aria-label="Pause" aria-pressed="false"><svg viewBox="0 0 14 14" aria-hidden="true"><path data-icon d="M4.500 3v8M9.500 3v8"></path></svg></button>
          <button type="button" data-more aria-label="One minute more"><svg viewBox="0 0 14 14" aria-hidden="true"><path d="M3 7h8M7 3v8"></path></svg></button>
        </span>
      </footer>
      <p class="sr" data-live aria-live="polite"></p>
    </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.

21 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 “Speaker timer” 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 dark card: at the top the room and a green “On time” tag, in the middle the time set huge, below it a thin line that shortens, and at the bottom the talk’s title with the speaker’s name and three round keys. In the demo time runs twenty times faster. As it goes down, the digits go from wide and light to narrow and heavy; at each minute the minutes digit makes a small hop. Under two minutes everything turns amber, the tag rolls to “Wrap up” and swells, the time takes a breath. At zero it turns red, shakes its head, the tag fills and says “Time’s up”, and the count starts going up with a plus in front. The plus key gives a minute (the time hops up and, if it is enough, goes back to green), the minus takes it away, pause stops it and dims it.

How it works

One clock

GSAP’s ticker gives the milliseconds gone by; multiplied by SPEED they take down the seconds left. A single function redraws everything from that number: digits, axes, line and state. The keys only change the number.

The squeeze

The share of time used, squared, moves two CSS variables: font-stretch from 125% to NARROW and font-weight from 480 to HEAVY. Squared, because almost nothing should happen at the start and a lot at the end.

Digits that do not dance

Each digit sits in a box 0.66em wide: when the type narrows the line does not jump. Only the digits that changed are rewritten. No tabular-nums: in Mona Sans it draws the slashed zero.

Values to change

NameFileDefaultWhat it changes
STARTscript.js190The seconds the count starts from.
WARNscript.js120Below how many seconds “Wrap up” appears.
SPEEDscript.js20How fast time runs in the demo: 1 is real time.
NARROWscript.js78The font width when time is up (125 with full time).
HEAVYscript.js860The font weight when time is up (480 with full time).
CALMscript.js#7be495The colour when there is time.
AMBERscript.js#ffb547The colour of “Wrap up”.
REDscript.js#ff5a5fThe colour when time is up.
LOOPscript.jstrueLeft alone, a pointer gives a minute and the count starts again.

Try them in the Playground

When to use it

On the confidence monitor of a conference or meetup, on an event’s site to show the tool to speakers, in any countdown where what matters is seeing at a glance how much is left (exams, cooking, auctions). With SPEED at 1 it is a real timer.

On phones

The same card, as wide as the screen; the digits scale with the width (25vw, between 78 and 104 pixels) and the three keys stay at 34 pixels.

With reduced motion

Time still runs (it is the information) and the digits tighten, but with no hops, shakes or rolling tag: colours and texts change at once.

Pitfalls

  • The digits are rewritten only when they change: rewriting the text sixty times a second would lose the selection and make the browser work for nothing.
  • role=timer with aria-live off: a screen reader must not read every second; the changes of state go in a separate line.
  • The change of state is felt only once (a shake, a breath): no blinking and nothing that pulses.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 16 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 animations