Skip to content
animorio
IT
Back to the library

Launch countdown

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

The countdown to the launch of a made-up app, Lanterne 3, in the clean style of today’s products: days, hours, minutes and seconds in large variable-width digits. Every digit that changes falls away with a slight blur and the new one drops in from above, narrow, widens and goes one pixel past its place before settling; when the seconds reach zero the minutes change with a little extra weight. Below, sixty thin ticks follow the seconds and the Remind me button becomes Reminder set with its spring.

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>
<!--
  "Launch countdown" 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 launch countdown with falling digits</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>
    <!-- the countdown to the launch of a made-up app, Lanterne 3: every digit that changes falls away and the new one
         drops in from above with a one pixel overshoot; a ruler of sixty ticks follows the seconds -->
    <section class="count" aria-label="Countdown to the Lanterne 3 launch" data-frame>
      <p class="eyebrow"><span data-event>Lanterne 3</span> <span class="eyebrow__soft">launch keynote</span></p>
      <h1 class="title">Starts in</h1>

      <div class="units" data-units role="timer" aria-live="off">
        <div class="unit" data-unit="d"><div class="pair"><span class="slot" data-slot></span><span class="slot" data-slot></span></div><span class="label">days</span></div>
        <span class="sep" aria-hidden="true"></span>
        <div class="unit" data-unit="h"><div class="pair"><span class="slot" data-slot></span><span class="slot" data-slot></span></div><span class="label">hours</span></div>
        <span class="sep" aria-hidden="true"></span>
        <div class="unit" data-unit="m"><div class="pair"><span class="slot" data-slot></span><span class="slot" data-slot></span></div><span class="label">minutes</span></div>
        <span class="sep" aria-hidden="true"></span>
        <div class="unit" data-unit="s"><div class="pair"><span class="slot" data-slot></span><span class="slot" data-slot></span></div><span class="label">seconds</span></div>
      </div>

      <div class="ruler" data-ruler aria-hidden="true"></div>

      <p class="when" data-when>Thursday, November 12, 9:00 AM PT</p>

      <button class="remind" type="button" data-remind aria-pressed="false">
        <span class="remind__bg" data-remind-bg aria-hidden="true"></span>
        <span class="remind__icon" aria-hidden="true">
          <svg class="bell" data-bell viewBox="0 0 24 24"><path d="M6.5 16.5V11a5.5 5.5 0 0 1 11 0v5.5l1.5 1.6H5Z"/><path d="M10 20.2a2.2 2.2 0 0 0 4 0"/></svg>
          <svg class="tick" data-tick viewBox="0 0 24 24"><path d="M5.5 12.6l4.1 4 8.9-9.2"/></svg>
        </span>
        <span class="remind__words" data-words>
          <span class="remind__word" data-word="off">Remind me</span>
          <span class="remind__word" data-word="on">Reminder set</span>
        </span>
      </button>
    </section>

    <svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true"><path d="M5 2.8v16.4l4.2-4 2.8 6.2 2.9-1.3-2.8-6.1h5.9Z"/></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.

24 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 “Launch countdown” 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 warm white background, in the middle, there is the countdown to the launch of Lanterne 3, a made-up app: above, the name and the words launch keynote, the headline Starts in and below four pairs of large black digits, days, hours, minutes and seconds, divided by thin lines and with a small label under each. Every second the digit that changes falls down, narrows and blurs a little as it disappears, and the new one comes down from above narrow, widens with the variable typeface, goes one pixel past its place and comes back up. When the seconds reach zero the minutes change too, and the hours if needed, one after the other a few hundredths apart: the bigger unit sinks by two pixels with a small bounce and its label lights up orange for a moment. Under the digits a ruler of sixty thin ticks follows the seconds: the past ones turn dark, the one of the current second rises in orange, and with every new minute they go back to grey in a wave from right to left. Further down the date and the black Remind me button with its bell: pressed, it dips, the bell swings and leaves, an orange check draws itself in its place, the label rises and becomes Reminder set while the button turns white and widens with a spring. A drawn pointer presses it by itself, then the countdown starts again with the digits rising back.

How it works

One box per digit

Each digit has its own box six tenths of the type size wide, with hidden overflow and a mask faded at the top and bottom, so digits coming in and going out melt instead of being cut. The numbers are tabular and the type size is a clamp on vw and vh together.

The falling digit

When a digit changes, the old one drops by 92% with power2.in, loses opacity and gets a touch of blur and a narrower wdth; the new one starts at -100%, narrow at wdth 72, and reaches its place plus one pixel with power3.out while font-variation-settings brings it back to 84. A second tween takes it back to zero with sine.inOut: that is the settle.

The weight of the cascade

The units update from the seconds up to the days, each CASCADE seconds after the smaller one. A unit that changes because the other reached zero goes three pixels past instead of one, its pair of digits sinks two pixels and returns with elastic.out and its label lights up in the accent colour for a moment.

The sixty ticks

The ruler is made of sixty one-pixel lines, one in five taller. Each tick has a state, empty, filled or current, and animates only when the state changes: the current one rises with scaleY and back.out, and with each new minute the filled ones turn grey again with a delay that grows from right to left.

The reminder button

The two labels sit one above the other in a window one line tall, as wide as the visible label and measured on resize. Pressed, the background dips to 95%, the bell swings with keyframes and shrinks, the check draws itself with stroke-dashoffset, the new label rises with a spring and the window widens with back.out.

Values to change

NameFileDefaultWhat it changes
EVENTscript.js'Lanterne 3'The name of the made-up launch, written above the countdown.
STARTscript.js187207The seconds left when the countdown starts.
FALLscript.js0.46The seconds of a digit falling and the new one arriving.
OVERSHOOTscript.js1The pixels the new digit goes past its place before settling.
CASCADEscript.js0.08The seconds between a unit and the bigger one when one reaches zero.
LOOPscript.js14The seconds of the drawn pointer’s loop before the countdown starts again.

Try them in the Playground

When to use it

For the page of a launch, an online event or a sale that opens at a set time: the time left reads from afar, the passing second shows without distracting, and anyone who doesn’t want to wait asks for the reminder.

On phones

The same animation with adapted sizes: the digits are sized on width and height together, the four units stay on one row, the ruler narrows with them and the button is pressed with a finger.

With reduced motion

No falls and no bounces: the digits change with a fade, the ticks change colour without rising in motion and the button switches to Reminder set with a fade, with the check already drawn.

Pitfalls

  • GSAP writes its transform inline: the incoming digit uses yPercent for the fall and y for the extra pixel, two different properties, so the settle does not cancel the fall.
  • Going back to grey with a tween towards an empty string made the colour jump: the ticks tween to the real colours read from the :root variables.
  • The button label window has a width in pixels: it is measured again on resize and once the fonts have loaded, otherwise Reminder set was cut off.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 26 October 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