Skip to content
animorio
IT
Back to the library

Minute counting clock

Transitions, TextGSAPMediumCompressed weight: Demo 5.5 KBGSAP 28 KBFreeDownload the zip

Between one chapter and the next a dark card slides in: the name cuts in, then a huge clock counts the minutes up to the chapter's time and the new page arrives from the side.

Rebuilt from scratch studying lemansclassic.richardmille.com by Magnetism: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "Minute counting clock" 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="it">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>L’orologio che conta i minuti</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- i capitoli: uno alla volta; fra l'uno e l'altro passa la scheda con l'orologio -->
  <main class="pagine">
    <section class="pagina pagina--giallo attiva" data-titolo="Partenza" data-giorno="Primo giorno" data-da="06:15" data-a="06:30" data-sotto="Il furgone lascia l’officina prima che faccia chiaro" aria-label="Partenza">
      <div class="pagina__testo">
        <p class="pagina__quando">Primo giorno, 06:30</p>
        <h2 class="pagina__titolo">Partenza</h2>
        <p class="pagina__corpo">Il furgone esce quando è ancora buio. Dietro, le gomme legate con le cinghie e un thermos che nessuno ha chiuso bene.</p>
      </div>
      <figure class="pagina__foto" aria-hidden="true"><div class="pagina__foto-dentro"><img src="gomme.webp" width="960" height="640" alt="" decoding="async"></div></figure>
    </section>
    <section class="pagina pagina--carta" data-titolo="Il box" data-giorno="Primo giorno" data-da="06:30" data-a="09:15" data-sotto="Le serrande si alzano una dopo l’altra" aria-label="Il box">
      <div class="pagina__testo">
        <p class="pagina__quando">Primo giorno, 09:15</p>
        <h2 class="pagina__titolo">Il box</h2>
        <p class="pagina__corpo">Ogni box ha già il suo rumore: un compressore, una radio accesa, una chiave che cade sul cemento.</p>
      </div>
      <figure class="pagina__foto" aria-hidden="true"><div class="pagina__foto-dentro"><img src="box.webp" width="1024" height="735" alt="" decoding="async"></div></figure>
    </section>
    <section class="pagina pagina--inchiostro" data-titolo="La notte" data-giorno="Primo giorno" data-da="21:40" data-a="22:30" data-sotto="I fari passano più veloci del rumore" aria-label="La notte">
      <div class="pagina__testo">
        <p class="pagina__quando">Primo giorno, 22:30</p>
        <h2 class="pagina__titolo">La notte</h2>
        <p class="pagina__corpo">Dopo il tramonto la pista diventa una fila di fari. Il rumore arriva sempre un attimo dopo la luce.</p>
      </div>
      <figure class="pagina__foto" aria-hidden="true"><div class="pagina__foto-dentro"><img src="notte.webp" width="1024" height="683" style="object-position: 88% 100%" alt="" decoding="async"></div></figure>
    </section>
    <section class="pagina pagina--carta" data-titolo="L’alba" data-giorno="Secondo giorno" data-da="05:20" data-a="06:05" data-sotto="La pioggia smette quando nessuno guarda" aria-label="L’alba">
      <div class="pagina__testo">
        <p class="pagina__quando">Secondo giorno, 06:05</p>
        <h2 class="pagina__titolo">L’alba</h2>
        <p class="pagina__corpo">Ha piovuto tutta la notte. Il primo a vedere il cielo che si apre è chi asciuga i cordoli.</p>
      </div>
      <figure class="pagina__foto" aria-hidden="true"><div class="pagina__foto-dentro"><img src="alba.webp" width="960" height="641" alt="" decoding="async"></div></figure>
    </section>
    <section class="pagina pagina--giallo" data-titolo="L’arrivo" data-giorno="Secondo giorno" data-da="15:10" data-a="15:30" data-sotto="La bandiera scende una volta sola" aria-label="L’arrivo">
      <div class="pagina__testo">
        <p class="pagina__quando">Secondo giorno, 15:30</p>
        <h2 class="pagina__titolo">L’arrivo</h2>
        <p class="pagina__corpo">Ventiquattro ore per venti secondi di bandiera. Poi tutti corrono in pista e i box restano vuoti.</p>
      </div>
      <figure class="pagina__foto" aria-hidden="true"><div class="pagina__foto-dentro"><img src="bandiera.webp" width="1024" height="768" alt="" decoding="async"></div></figure>
    </section>
  </main>

  <!-- la scheda scura: prima il nome del capitolo, poi l'orologio che conta fino all'ora giusta -->
  <div class="scheda" aria-hidden="true">
    <p class="scheda__titolo"><span class="scheda__parola">Partenza</span></p>
    <div class="scheda__orologio">
      <p class="scheda__giorno"><span>Primo giorno</span></p>
      <p class="scheda__ora"><span class="cifra">0</span><span class="cifra">6</span><span class="due-punti">:</span><span class="cifra">1</span><span class="cifra">5</span></p>
      <p class="scheda__sotto"></p>
    </div>
  </div>

  <button type="button" class="avanti">Capitolo dopo</button>
  <p class="annuncio" aria-live="polite"></p>

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

41 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 “Minute counting clock” 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

Every chapter has a time. To move to the next one a black card slides in from the right and turns ink grey; on it, cut in at once, the chapter's name as wide as the screen. After a second and a half the name disappears and in its place a huge clock counts the minutes from the previous time to the chapter's, with a blinking colon and digits that jump slightly at every minute. Below, the day and a sentence rising word by word. When the count ends the new page arrives from the side and covers the card; its photo lags a moment behind inside the frame. The photos are real ones, printed in black and white.

How it works

The card

A fixed card enters with xPercent from 100 to 0 in 0.8 seconds with expo.out (from the bottom on phones) while its background goes from black to ink grey. Name and clock are not animated: they appear and disappear with a visibility set, hard cuts as in film editing.

The count

The clock counts in total minutes (hours times 60 plus minutes), so it crosses hours and even midnight. An object goes from the starting minutes to the arrival ones with power2.inOut; in onUpdate the value is floored and the time is rewritten only when the minute changes, with a small jump of the digits instead of a tick.

Steady digits

Each digit sits in a fixed-width box (0.5em, centred text): without it, the clock shakes while it counts. Tabular figures (tabular-nums) would do the same, but in Mona Sans they have a slashed zero. The colon blinks in CSS with a step-end animation on visibility.

The page that arrives

Each page is a fixed layer of its own, so the new one can pass over the card with a higher z-index. It enters with x from the screen width to 0; the photo inside the frame is 14% wider and starts offset, so it arrives a little after the page.

Values to change

NameFileDefaultWhat it changes
ENTRATAscript.js0.8Seconds for the card to slide in.
TITOLOscript.js1.5How many seconds the chapter name stays before the clock.
CONTAscript.js1Seconds of the count, whatever the distance between the two times.
ATTESAscript.js2.6Seconds on each page before the next chapter. With 0 it only changes with the button.
data-da, data-aindex.html06:15, 06:30On each page: the time the count starts from and the chapter's time.

Try them in the Playground

When to use it

For a story split into moments: the schedule of a day, the stages of a trip, the hours of an event. The transition takes four seconds: fine between chapters, not between any two pages of a site.

On phones

The card rises from the bottom instead of entering from the side, the photo goes above the text and the clock adapts to the width.

With reduced motion

No card and no count: the button goes straight to the next chapter, which already shows its time. Chapters do not change on their own.

Pitfalls

  • With proportional figures every digit has its own width and the clock wobbles while it counts: you need fixed boxes or tabular figures.
  • Count in total minutes, not in separate hours and minutes: otherwise from 06:30 to 09:15 the minutes run backwards.
  • If all the pages sit inside a fixed container, that container creates a stacking context and the new page never passes over the card: every page must be fixed on its own.
  • The original site makes the clock tick with a sound: if you add it, start it only after a click and always leave a way to turn it off.
  • The photos are landscape and the frame is tall: with object-fit: cover you see the middle, so pick photos with the subject in the centre (the shutter, the flag, the tread). The CSS makes them black and white (grayscale), so the same photo can also be used in colour.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 8 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: Done

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