Skip to content
animorio
IT
Back to the library

Day and night dial

Transitions, SVGGSAP, CSS onlyMediumCompressed weight: Demo 7.7 KBGSAP 28 KBFreeDownload the zip

The dial of the Meridian 38 by Velde, a made-up Swiss watchmaker, drawn in SVG with baton indices, a minute track, small seconds and a date window: the «Night» pill takes the page to night, the watch drops to a third of its light and the luminous paint on the indices and hands lights up one after another, with a glow that flares and settles. The hands tell the real time. Minimal style, inspired by the Prägen Hätlen site.

Rebuilt from scratch studying pragenhatlen.com by cher ami: 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>
<!--
  "Day and night dial" 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>Meridian 38 · Velde</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/manrope@5.3.0/index.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/red-hat-mono@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- The dial of the Meridian 38 by Velde, a made-up Swiss watchmaker. The pill switches the page to night: the
       ground goes dark, the watch dims to a third and the luminous paint on the indices and hands lights up. -->
  <div class="notte" data-notte aria-hidden="true"></div>
  <main class="palco">
    <header class="testa">
      <p class="marca">Velde</p>
      <p class="stato" aria-live="polite"><span class="par">[</span><span class="rullo" data-rullo><span class="voce" data-voce>Day</span></span><span class="par">]</span></p>
    </header>

    <div class="centro">
      <svg class="quadrante" data-quadrante viewBox="-14 0 428 400" role="img" aria-label="Velde Meridian 38 dial showing the current time">
        <defs>
          <linearGradient id="acciaio" x1="0" y1="0" x2="1" y2="1">
            <stop offset="0" stop-color="#f4f5f6"/>
            <stop offset=".35" stop-color="#b9bec4"/>
            <stop offset=".6" stop-color="#eceef0"/>
            <stop offset="1" stop-color="#7d848c"/>
          </linearGradient>
          <linearGradient id="acciaio-dentro" x1="1" y1="1" x2="0" y2="0">
            <stop offset="0" stop-color="#e9ebed"/>
            <stop offset=".5" stop-color="#8f969e"/>
            <stop offset="1" stop-color="#d7dadd"/>
          </linearGradient>
          <radialGradient id="fondo-quadrante" cx=".42" cy=".36" r=".75">
            <stop offset="0" stop-color="#2e3c49"/>
            <stop offset=".6" stop-color="#1a242d"/>
            <stop offset="1" stop-color="#0f151a"/>
          </radialGradient>
          <linearGradient id="bastone" x1="0" y1="0" x2="1" y2="0">
            <stop offset="0" stop-color="#ffffff"/>
            <stop offset=".45" stop-color="#c3c8ce"/>
            <stop offset="1" stop-color="#8a9199"/>
          </linearGradient>
          <linearGradient id="vetro" x1="0" y1="0" x2=".6" y2="1">
            <stop offset="0" stop-color="#fff" stop-opacity=".22"/>
            <stop offset=".5" stop-color="#fff" stop-opacity=".04"/>
            <stop offset="1" stop-color="#fff" stop-opacity="0"/>
          </linearGradient>
          <filter id="ombra-lancetta" x="-50%" y="-50%" width="200%" height="200%">
            <feDropShadow dx="1.6" dy="2.6" stdDeviation="1.6" flood-color="#000" flood-opacity=".45"/>
          </filter>
          <filter id="alone" x="-60%" y="-60%" width="220%" height="220%">
            <feGaussianBlur stdDeviation="3.2"/>
          </filter>
          <clipPath id="taglio-quadrante"><circle cx="200" cy="200" r="176"/></clipPath>
        </defs>

        <g data-orologio>
          <!-- crown at three o'clock -->
          <rect x="394" y="186" width="12" height="28" rx="3" fill="url(#acciaio-dentro)"/>
          <g stroke="#6d747c" stroke-width=".6" opacity=".7">
            <line x1="397" y1="188" x2="397" y2="212"/><line x1="400" y1="188" x2="400" y2="212"/><line x1="403" y1="188" x2="403" y2="212"/>
          </g>
          <!-- case and bezel -->
          <circle cx="200" cy="200" r="197" fill="url(#acciaio)"/>
          <circle cx="200" cy="200" r="190" fill="url(#acciaio-dentro)"/>
          <circle cx="200" cy="200" r="183" fill="#0c1114"/>
          <!-- dial -->
          <circle cx="200" cy="200" r="176" fill="url(#fondo-quadrante)"/>
          <g data-raggiera clip-path="url(#taglio-quadrante)"></g>
          <g data-minuteria></g>
          <g data-indici></g>
          <text x="200" y="124" text-anchor="middle" class="sq-marca">VELDE</text>
          <text x="200" y="139" text-anchor="middle" class="sq-modello">MERIDIAN 38</text>
          <text x="200" y="333" text-anchor="middle" class="sq-svizzera">SWISS MADE</text>
          <!-- date window -->
          <rect x="292" y="190" width="32" height="20" rx="2.5" fill="#0a0e11" stroke="url(#bastone)" stroke-width="1.6"/>
          <rect x="294.5" y="192.5" width="27" height="15" rx="1.5" fill="#f2f0ea"/>
          <text x="308" y="204.4" text-anchor="middle" class="sq-data" data-data>3</text>
          <!-- small seconds -->
          <g data-piccoli></g>
          <g data-lancetta-secondi filter="url(#ombra-lancetta)">
            <path d="M -0.8 8 L -0.6 -29 L 0 -31 L 0.6 -29 L 0.8 8 Z" transform="translate(200 280)" fill="#e9ecef"/>
            <circle cx="200" cy="280" r="2.6" fill="#e9ecef"/>
          </g>
          <!-- hour and minute hands, steel bodies -->
          <g data-lancetta-ore filter="url(#ombra-lancetta)">
            <path d="M -5 20 L -6.6 -20 L 0 -100 L 6.6 -20 L 5 20 Z" transform="translate(200 200)" fill="url(#bastone)"/>
          </g>
          <g data-lancetta-minuti filter="url(#ombra-lancetta)">
            <path d="M -4 24 L -5 -28 L 0 -152 L 5 -28 L 4 24 Z" transform="translate(200 200)" fill="url(#bastone)"/>
          </g>
          <circle cx="200" cy="200" r="7.5" fill="url(#acciaio)"/>
          <circle cx="200" cy="200" r="2.4" fill="#1a1f24"/>
        </g>

        <!-- night: the watch drops to a third of its brightness -->
        <circle cx="200" cy="200" r="198" fill="#000" opacity="0" data-buio/>

        <!-- luminous paint: the glow underneath, the paint on top -->
        <g data-alone filter="url(#alone)"></g>
        <g data-lume></g>

        <!-- glass -->
        <g data-vetro>
          <path d="M 64 150 A 144 144 0 0 1 252 62 A 170 170 0 0 0 64 150 Z" fill="url(#vetro)"/>
          <circle cx="200" cy="200" r="182" fill="none" stroke="#fff" stroke-opacity=".08" stroke-width="1"/>
        </g>
      </svg>
    </div>

    <footer class="piede">
      <button class="pillola" type="button" data-pillola aria-pressed="false">
        <span class="facce" data-facce>
          <span class="faccia" data-faccia-notte>
            <svg class="icona luna" viewBox="0 0 20 20" aria-hidden="true"><path d="M15.6 12.6A6.6 6.6 0 0 1 7.4 4.4a6.6 6.6 0 1 0 8.2 8.2Z"/></svg>
            <span class="parola">Night</span>
          </span>
          <span class="faccia" data-faccia-giorno>
            <svg class="icona sole" viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="3.4"/><path d="M10 2.2v2M10 15.8v2M2.2 10h2M15.8 10h2M4.5 4.5l1.4 1.4M14.1 14.1l1.4 1.4M4.5 15.5l1.4-1.4M14.1 5.9l1.4-1.4"/></svg>
            <span class="parola">Day</span>
          </span>
        </span>
      </button>
      <p class="nota">Meridian 38 <span class="par">[</span>luminous dial<span class="par">]</span></p>
    </footer>
  </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.

28 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 “Day and night dial” 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 paper-grey ground, the Meridian 38 dial seen from above: the steel case with its crown, the midnight-blue dial with a faint sunburst, the minute track, the polished baton indices (doubled at twelve, none at three where the date sits, a short one at six above the small seconds), the Velde mark and «Meridian 38», the sword hands with their shadow telling the real time and the small seconds ticking on a spring, the reflection on the glass. At the top the brand and the state in brackets, below the blue-grey «Night» pill with its moon. On a tap the ground turns to night in 0.75 seconds, the watch drops to a third of its light and the luminous paint lights up in mint, one index after another clockwise and then the hands, with a glow that rises past its rest and settles; the pill goes dark, the word drops away and «Day» rises with its sun, the state at the top rolls. A second tap brings the day back. On its own the demo goes from day to night and back.

How it works

Two layers over the watch

The dial is an SVG; above it sits a black circle at zero opacity, the dark, and above that the luminous paint with its blurred copy, the glow, underneath. At night the dark goes to 0.7: the watch keeps 0.3 of its light, like the site's brightness(.3), while the paint, sitting on top, stays full.

The ground turning to night

A fixed veil with the gradient from #202020 to #060606 goes from 0 to 1 in 0.75 seconds on the easeOutCubic curve (.215, .61, .355, 1), the site's own; brand, state and pill change colour with a CSS transition of the same length.

The paint, one plot at a time

Each index and hand has its own slot of paint, cream by day: GSAP takes its colour to mint in 1 second, 0.035 seconds apart clockwise from twelve, then the hands. The glow rises to 1 and comes back to 0.82: the light settles.

The real time

On the GSAP ticker the hour and minute hands turn with the computer's clock; the small seconds tick every second with back.out, always forward, and the paint on the hands turns with their steel bodies.

By itself, until you touch it

Two seconds of day and three and a half of night, then it switches by itself; a tap on the pill stops it for eight seconds.

Values to change

NameFileDefaultWhat it changes
NIGHT_FADEscript.js0.75Seconds for the ground to turn to night.
LUME_INscript.js1Seconds for each lume plot to light up.
LUME_STAGGERscript.js0.035The delay between one lume plot and the next.
DIMscript.js0.3The watch's brightness at night (1 is as by day).
HOLD_DAYscript.js2.2Seconds of day before it switches by itself.
HOLD_NIGHTscript.js3.4Seconds of night before the day comes back.
LUMEscript.js#8ff0cfThe colour of the luminous paint at night.

Try them in the Playground

When to use it

For the page of a watch, a luxury brand or a product with a night version; as the dark-mode switch of a site, when going to night should tell something and not just flip the colours.

On phones

The dial is sized on the smaller of 78% of the width and 62% of the height, so it fits whole even in the phone's short box; the pill stays 128 by 44 pixels.

With reduced motion

No sliding: night fades in, the paint lights up all at once, the pill's word and the state cross-fade and the small seconds step without a spring.

Pitfalls

  • The dark must not cover the paint: it sits between the watch and the paint layer, so the paint stays full while everything else drops to a third.
  • The paint on the hands is drawn in separate groups above the dark: on every frame they turn by the same angle as the steel bodies.
  • From 354 to 0 degrees the small seconds would spin back a whole turn: the angle is always carried forward by adding 360.
  • The pill's two faces are absolute over the whole pill, so the hidden word never widens it and icon and word stay centred.

Libraries

GSAP 3.15.0, Manrope (font variabile) 5.3.0, Red Hat Mono (font variabile) 5.3.0.

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

Testing

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