
The star rating
Ratings, SVG, Hover
An app’s sleep schedule, in a card on white: a 24-hour ring with midnight at the top and two handles to drag, the moon for bedtime and the sun for waking up. Between them a purple arc follows the handles, gliding, in the middle the hours of sleep count and below the two times roll. Under seven hours the arc, the icons and the pill at the top turn amber: “A little short”. The handles snap every quarter of an hour and move with the arrow keys too.
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>
<!--
"Sleep schedule" 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>Sleep schedule</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">
<!-- a sleep schedule on a 24-hour ring: two handles to drag, bedtime and wake-up, the arc between them and
the hours of sleep counting in the middle -->
<section class="sl" data-sl aria-label="Sleep schedule">
<header class="sl__head">
<div class="sl__what"><strong>Sleep schedule</strong><span>Every night</span></div>
<span class="sl__pill"><span class="sl__clip"><span data-outtone>Well rested</span></span></span>
</header>
<div class="sl__dial" data-dial>
<svg class="sl__svg" data-svg viewBox="0 0 220 220">
<circle class="sl__track" cx="110" cy="110" r="86"></circle>
<g class="sl__ticks" data-ticks aria-hidden="true"></g>
<path class="sl__arc" data-arc></path>
<g class="sl__knob" data-knob="bed" role="slider" tabindex="0" aria-label="Bedtime" aria-valuemin="0" aria-valuemax="24"><circle r="15" class="sl__hit"></circle><circle r="10.500" class="sl__dot"></circle><path class="sl__ic" d="M2.400 -4.600A5.200 5.200 0 1 0 4.700 2.600A4.200 4.200 0 0 1 2.400 -4.600Z"></path></g>
<g class="sl__knob" data-knob="wake" role="slider" tabindex="0" aria-label="Wake-up time" aria-valuemin="0" aria-valuemax="24"><circle r="15" class="sl__hit"></circle><circle r="10.500" class="sl__dot"></circle><circle class="sl__ic" r="2.600"></circle><path class="sl__ray" d="M0 -5.800v1.400M0 4.400v1.400M-5.800 0h1.400M4.400 0h1.400M-4.100 -4.100l1 1M3.100 3.100l1 1M-4.100 4.100l1 -1M3.100 -3.100l1 -1"></path></g>
</svg>
<div class="sl__mid" aria-hidden="true"><b data-outdur>8 h</b><span data-outsub>of sleep</span></div>
</div>
<dl class="sl__times">
<div><dt>Bedtime</dt><dd><span class="sl__clip sl__clip--big"><span data-outbed>23:00</span></span></dd></div>
<div><dt>Wake up</dt><dd><span class="sl__clip sl__clip--big"><span data-outwake>07:00</span></span></dd></div>
</dl>
</section>
<span class="live" aria-live="polite" data-live></span>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></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.
20 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Sleep schedule” from Animorio and fit it into my siteBedtime and wake-up time: from them come the two points on the ring, the arc between them (clockwise, past midnight too) and the hours of sleep.
The angle between the ring’s centre and the pointer becomes an hour out of 24, rounded to the quarter: the finger does not have to stay right on the ring.
The chosen hour snaps, the drawn one catches up on a short spring and always the short way round, across midnight too.
One CSS variable colours arc, icons and pill: the class changes under the hours threshold, and the pill says it in words.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #5753d6 | The colour of the sleep arc when the hours are enough. |
BED | script.js | 23 | Bedtime at the start, in decimal hours (23.5 = 23:30). |
WAKE | script.js | 7 | The wake-up time at the start. |
SNAP | script.js | 15 | How many minutes the handles snap to. |
ENOUGH | script.js | 7 | Under how many hours of sleep the arc changes colour. |
LOOP | script.js | true | Left alone, the demo’s pointer drags bedtime first and then wake-up. |
In the settings of a sleep app, a watch or a phone, in a “do not disturb” mode, in a health app’s evening routine; the same two-handle ring carries a heating schedule, the quiet hours of notifications, a work shift or a fasting window.
The card is at most 316 pixels wide and about 345 tall. The ring is 204 pixels wide and narrows with the screen’s width and height; the handles have a 30-pixel target and drag with a finger without scrolling the page.
The arc appears already open and, when dragging, jumps from one quarter of an hour to the next without gliding; the handles do not swell and times and pill change in one step. The demo’s pointer does not start.
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 2 December 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.
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.