Skip to content
animorio
IT
All components

Dial kitchen timer

Timers, Hover, PhysicsGSAP, CSS onlyMediumCompressed weight: Demo 10 KBGSAP 28 KBFreeDownload the zip

The kitchen timer of a made-up recipe app, Ortica, on black: like an old wind-up kitchen timer you turn the whole brushed metal bezel under a fixed index, and the minute ticks click past one by one with a small bounce while the big figure in the middle rolls. Let go, the bezel slowly turns back as the time runs down and the arc of time left shortens; in the last ten seconds the accent warms from amber to red, and at zero the bezel buzzes twice and says Pasta’s ready. Below, three presets: Eggs 7, Pasta 10, Rice 18.

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>
<!--
  "Dial kitchen 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>The kitchen timer with the dial you wind that turns back on its own</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 kitchen timer of a made-up recipe app: wind the brushed bezel round under the index like an old spring timer,
         let go and it turns back slowly as the time runs down; the arc of time left shortens, the accent warms up in the
         last seconds and at zero the dial buzzes and says the dish is ready -->
    <div class="timer" data-timer>
      <div class="dial" data-dial role="slider" tabindex="0" aria-label="Kitchen timer, minutes" aria-valuemin="0" aria-valuemax="60" aria-valuenow="0" aria-valuetext="0 minutes">
        <div class="dial__shake" data-shake>
          <span class="dial__glow" aria-hidden="true"></span>
          <div class="dial__press" data-press>
            <span class="dial__housing" aria-hidden="true"></span>
            <svg class="dial__track" viewBox="-150 -150 300 300" aria-hidden="true">
              <circle class="track" r="140" />
              <circle class="arc" data-arc r="140" pathLength="360" transform="rotate(-90)" />
              <circle class="flash" data-flash r="140" />
            </svg>
            <span class="dial__drop" aria-hidden="true"></span>
            <span class="dial__bezel" data-bezel aria-hidden="true"></span>
            <div class="dial__turn" data-turn aria-hidden="true">
              <span class="dial__knurl"></span>
              <svg class="dial__ticks" data-ticks viewBox="-129 -129 258 258"></svg>
            </div>
            <svg class="dial__index" viewBox="-150 -150 300 300" aria-hidden="true">
              <g data-needle>
                <line class="needle__shadow" x1="0" y1="-132" x2="0" y2="-111" />
                <line class="needle" x1="0" y1="-132" x2="0" y2="-111" />
              </g>
            </svg>
            <button class="face" type="button" data-face aria-label="Pause">
              <span class="face__brand">Ortica</span>
              <span class="face__time" data-time aria-hidden="true"></span>
              <span class="face__label">
                <svg class="glyph" viewBox="0 0 12 12" aria-hidden="true">
                  <g class="glyph__pause" data-gpause><rect x="2.6" y="2" width="2.2" height="8" rx="0.9" /><rect x="7.2" y="2" width="2.2" height="8" rx="0.9" /></g>
                  <path class="glyph__play" data-gplay d="M3.4 2.4v7.2a.6.6 0 0 0 .9.5l5.6-3.6a.6.6 0 0 0 0-1L4.3 1.9a.6.6 0 0 0-.9.5Z" />
                </svg>
                <span class="face__words" data-label><span class="w" data-w>Turn to set</span><span class="w" data-w></span></span>
              </span>
            </button>
          </div>
        </div>
      </div>
      <div class="presets" data-presets role="group" aria-label="Recipes"></div>
      <p class="sr" data-live aria-live="polite"></p>
    </div>

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

23 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 “Dial kitchen 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 a black background there is only the kitchen timer of a made-up recipe app, Ortica: a dark disc with a thread of light on its edge and inside it a graphite brushed metal bezel, knurled on its rim, with the sixty minute ticks engraved and a figure every five. The metal’s highlights stay still with the light while the bezel turns under them, and with the mouse over it they lean slightly towards the pointer. At the top a fixed amber index; in the middle a black face that does not turn, with Ortica engraved, the big time in Mona Sans and a line below. Grabbed with a finger or the mouse, the bezel sinks a touch and turns like an old wind-up kitchen timer: between ticks it holds back, then clicks onto the next one with a small bounce, the index nods at every click, the ticks between the index and zero light up, the amber arc on the rim grows and the figures roll; below it says Let go to start. Let go, the timer starts on its own: the bezel slowly turns back as the time runs down, the arc shortens and every minute the index gives a smaller nod. In the last ten seconds the accent warms from amber to red, in the arc, the ticks, the presets’ figures and the glow behind the disc. At zero the bezel buzzes twice like a bell, a red ring flashes on the rim and the line below says Pasta’s ready; a moment later Turn to set comes back and the colour cools down. A tap on the face pauses it (the figures dim halfway, the arc turns grey, Paused) and starts it again. Below, three pills Eggs 7, Pasta 10 and Rice 18 that widen on hover: pressed, the bezel winds itself to their minutes, clicking on every tick, and starts. Left alone, a drawn pointer winds the bezel to twelve minutes and the time runs down fast; the next round it presses Pasta 10.

How it works

Still light, turning metal

The bezel is two layers: underneath a ring with the conic-gradient of the highlights and the fine circles of the brushing (repeating-radial-gradient), which does not turn; on top a transparent layer with the knurling (repeating-conic-gradient in a ring mask) and the SVG ticks, which turns. So the highlights stay with the light as on real metal. Minute m is engraved at -m steps: turning clockwise brings it under the index.

Dragging with detents

On every pointermove the pointer’s angle round the centre is measured with atan2 and the difference (wrapped between -180 and 180) is added up, so you can go round more than once and the finger can be anywhere on the ring. The target is the nearest tick plus part of the rest (DETENT): between two ticks the bezel holds back, then jumps. Past zero and past the full turn it only follows by a quarter, like a rubber band.

One spring for everything

A requestAnimationFrame loop integrates a spring (STIFF, BOUNCE) in four steps per frame, with the step capped at 1/30 of a second: it follows the finger, bounces after each tick and while running chases the time left, worth one degree every ten seconds. Every click also gives the velocity a small kick. When nothing moves the loop stops.

The rolling figures

Each figure is a column 9,0…9,0 in a window with a faded mask, moved with yPercent: the two extra cells turn 0 into 9 and 9 into 0 the right way round, then the column jumps back into place. When the time runs faster than the frames the seconds are set without animation.

The heat and the bell

In the last HOT_FROM seconds the --acc colour is mixed between ACCENT and HOT in JavaScript and written on :root, together with --heat, which raises the glow. At zero a GSAP timeline shakes the disc with rotation keyframes, flashes a red ring and swings the index round its tip, twice.

Values to change

NameFileDefaultWhat it changes
ACCENTscript.js#f3b664The accent of the arc, the index, the lit ticks and the presets’ figures.
HOTscript.js#ff5b3aThe warm colour the accent turns to in the last seconds.
HOT_FROMscript.js10How many seconds before the end the accent starts warming.
MAX_MINscript.js60The minutes of a whole turn of the bezel.
DETENTscript.js0.7How much the bezel stops on the ticks as you turn it, from 0 smooth to 1 notched.
STIFFscript.js260The bezel’s spring: the higher, the quicker it follows the finger.
BOUNCEscript.js0.5How much the bezel bounces on the tick, from 0 to 0.9.
PILOT_SPEEDscript.js150How many times faster the time runs when the demo is left alone.
PRESETSscript.js[["Eggs", 7], ["Pasta", 10], ["Rice", 18]]The three presets: the dish and the minutes.
DONE_HOLDscript.js2.6How many seconds the dish-ready line stays.

Try them in the Playground

When to use it

On a recipe page, in the cooking mode of a recipe app or a kitchen appliance, on the site of a restaurant or a pasta maker that gives away cooking times, in a home or café app: wherever you need a countdown set with a single gesture and readable from across the room.

On phones

The disc is sized on the shorter side (min(300px, 72vw, 54vh)) and the pills narrow a little under 380 pixels, so everything fits the phone box. The finger turns the bezel like the mouse, with touch-action none so the page does not scroll; without hover the highlights stay still.

With reduced motion

No spring, bounces, index nods or shaking: the bezel goes straight where it should, the figures change without rolling, the words fade and at zero the red ring fades out slowly. The pilot presses Pasta 10 without a pointer.

Pitfalls

  • With a round-capped arc, a few seconds before the end a small lit round stayed on the rim and looked like a dot: the arc has butt caps and hides below half a degree.
  • With too strong a back.out the rolling figures showed the next figure for a moment (12 looked like 13 as it stopped): the bounce went down to back.out(0.9), one pixel and no more.
  • If the metal’s highlights turned with the bezel it would look like a rotating drawing: the highlights live on a still layer and only the knurling and the ticks turn.
  • Adding up the pointer’s absolute angles, passing across the bottom made the value jump by 360 degrees: only the difference between one event and the next is added, wrapped between -180 and 180.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

Tested on 13 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 components