
The star rating
Ratings, SVG, Hover
The attendance button in a team’s app: a light pill with a clock and the shift’s start time. Pressed, a green tint leaves the clock and floods the pill, the hands take a run-up and start to run, the ring around them follows the shift and the tag counts the time worked. Pressed again it clocks out: the hands close into a tick and the label says how many hours were logged.
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>
<!--
"Clock in button" 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>Clock in button with the shift that starts counting</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 clock-in button of a team app: pressed, a green wash leaves the clock, its hands start to run, the ring
around it follows the shift and the tag on the right counts the time worked; pressed again it clocks out,
a tick draws itself in the clock and the label says how much was logged -->
<button class="ck" type="button" data-ck aria-pressed="false">
<span class="ck__body" aria-hidden="true"><span class="ck__wash" data-wash></span><span class="ck__light"></span></span>
<span class="ck__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<circle class="seat__track" cx="12" cy="12" r="10.2"></circle>
<circle class="seat__ring" data-ring cx="12" cy="12" r="10.2" pathLength="1" transform="rotate(-90 12 12)"></circle>
<g data-hands>
<path class="seat__hand" data-hh d="M12 12V7.6"></path>
<path class="seat__hand seat__hand--min" data-mm d="M12 12V5.2"></path>
</g>
<path class="seat__tick" data-tick pathLength="1" d="M8.2 12.4 10.9 15 15.9 9.4"></path>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Clock in</span></span>
<span class="label__sub"><span data-sub>Shift starts 9:00</span></span>
</span>
<span class="tag" aria-hidden="true"><span data-time>0:00</span></span>
</button>
<p class="sr" data-live aria-live="polite"></p>
<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>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.
16 values to change
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 “Clock in button” from Animorio and fit it into my siteThe minutes worked are one number that a linear tween takes from 0 to the shift’s length. At each step the same function turns the minute hand (6 degrees per minute) and the hour hand (half a degree), shortens the ring’s stroke-dashoffset and rewrites the tag: clock, ring and count cannot say three different things.
Inside the pill there is a coloured layer clipped with clip-path: circle() centred on the clock. On clocking in the radius goes from 0 to 360 pixels with power3.out, so the colour seems to come out of the dial.
The minutes tween stops where it is, the hands scale to zero, the ring runs to close, the tick draws itself with stroke-dashoffset and the label is composed from the minutes (hours and minutes). On the way back the same number returns to 0 with power3.inOut, and the hands rewind by themselves.
| Name | File | Default | What it changes |
|---|---|---|---|
START | script.js | 9:00 | The shift’s start time: the hands start from here. |
SHIFT | script.js | 8 | How many hours the shift lasts: when it ends the ring is closed. |
SPEED | script.js | 10 | How many shift minutes pass in one second (1/60 is real time). |
ACCENT | script.js | #12a868 | The colour while the shift is running. |
DONE | script.js | #4f5dff | The colour once the shift is closed. |
RUN | script.js | 4.6 | On its own: after how many seconds it clocks out. |
HOLD | script.js | 2.4 | On its own: how many seconds the summary stays before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
For the attendance app of a team, a shop, a restaurant or a building site, and for whoever tracks hours on a project. In a real product SPEED is 1/60 (real time), the start time is the moment of clocking in and the button stays on “Clock out” for as long as the shift is open.
The same button: the pill takes at most the screen width minus the margins; it is pressed with a finger and there is no light under the pointer.
No spreading tint, run-up or bounces: the colour fades in, the hands and the count still advance (they are the information), labels and tick change with a fade.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.9 KB; the libraries: GSAP 28 KB.
Tested on 15 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.