
The inchworm menu
Menus, Hover, Transitions
The button to book a wake-up call at a made-up hotel, Halden House. At rest it is a night-coloured pill with a small moon over the horizon. One tap rings the front desk: the moon sets, a handset rocks with its two waves and the label shines while it waits. When the desk confirms, the pill grows on a spring, the time rolls in one character at a time and a small sun rises over the horizon with a tick on it, while the night of the pill turns into dawn. Cancel sets the sun again and the moon comes back.
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>
<!--
"Wake-up call 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>The hotel wake-up call button with the sun rising in the pill</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 wake-up call button of a made-up hotel, Halden House: one tap rings the front desk, then the time rolls
in and a small sun rises over the horizon inside the pill, turning the night into dawn. Cancel sets it back. -->
<div class="wrap" data-wrap>
<div class="pill" data-pill>
<span class="pill__night" aria-hidden="true"></span>
<span class="pill__dawn" data-dawn aria-hidden="true"></span>
<span class="pill__glow" data-glow aria-hidden="true"></span>
<span class="pill__light" data-light aria-hidden="true"></span>
<span class="pill__grain" aria-hidden="true"></span>
<span class="pill__rim" data-rim aria-hidden="true"></span>
<!-- the little window on the left: moon, then the handset ringing, then the sun over the horizon -->
<span class="slot" aria-hidden="true">
<span class="slot__sky">
<span class="slot__moon" data-moon>
<svg viewBox="0 0 20 20"><path d="M13.6 13.9A6 6 0 0 1 8.1 4.1a6 6 0 1 0 5.5 9.8Z"></path></svg>
</span>
<span class="slot__sun" data-sun>
<svg viewBox="0 0 20 20"><path class="slot__tick" data-tick d="M6.4 10.3 8.9 12.7 13.7 7.6"></path></svg>
</span>
</span>
<span class="slot__horizon" data-horizon></span>
<span class="slot__glint" data-glint></span>
<span class="slot__phone" data-phone>
<svg viewBox="0 0 24 24">
<path class="slot__wave" data-wave d="M15.2 4.6a5 5 0 0 1 4.2 4.2"></path>
<path class="slot__wave" data-wave d="M15 1.6a8 8 0 0 1 7.4 7.4"></path>
<g data-handset><path d="M6.6 3.4 8.9 3a1 1 0 0 1 1.1.7l.9 3.1a1 1 0 0 1-.4 1.1l-1.5 1a11 11 0 0 0 5.6 5.6l1-1.5a1 1 0 0 1 1.1-.4l3.1.9a1 1 0 0 1 .7 1.1l-.4 2.3a1.4 1.4 0 0 1-1.4 1.2A14.6 14.6 0 0 1 5.4 4.8a1.4 1.4 0 0 1 1.2-1.4Z"></path></g>
</svg>
</span>
</span>
<!-- three faces of the same pill -->
<button class="face face--rest" type="button" data-call data-face="rest" aria-label="Book a wake-up call for 7:00">
<span class="face__label" data-label>Wake-up call</span>
<span class="face__sep" aria-hidden="true"></span>
<span class="face__time" data-resttime>7:00</span>
</button>
<div class="face face--wait" data-face="wait" aria-hidden="true">
<span class="face__label face__shimmer">Calling front desk</span>
<span class="face__sub">Room <span data-room>412</span></span>
</div>
<div class="face face--set" data-face="set" aria-hidden="true">
<span class="face__stack">
<span class="face__label">Wake-up at <span class="digits" data-digits>7:00</span></span>
<span class="face__sub">Tomorrow · Room <span data-room>412</span></span>
</span>
<button class="cancel" type="button" data-cancel tabindex="-1">Cancel</button>
</div>
</div>
<span class="sr" aria-live="polite" data-live></span>
</div>
</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.
27 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 “Wake-up call button” from Animorio and fit it into my siteRest, waiting and confirmed are three layers stacked in the same pill. Each one is measured at its natural width (with right: auto for a moment) and GSAP takes the pill’s width from one size to the next with a back.out, while the old face leaves and the new one comes in by six pixels. Sizes are read again on resize.
The round window has a sky two thirds high with hidden overflow: moon and sun live inside it, so when they go down they vanish exactly on the horizon line. The sun rises with yPercent to six points past its place and comes back with a sine: the extra pixel that settles.
Under the faces there are two grounds: the night and the dawn, a gradient from blue to apricot. The dawn fades in together with a radial glow starting from the sun, the reflection under the horizon and a pill shadow that GSAP takes from blue to warm, keeping the same box-shadow shape.
A repeating timeline rocks the handset twice, lights the two waves one after the other and rests for a breath; the waiting label has a gradient clipped to the text, whose position GSAP moves through a CSS variable. On confirmation the timeline is killed and the handset goes back upright.
Each character of the time sits in its own one-line window with hidden overflow, and comes up from below with a 70 millisecond stagger and a back.out.
| Name | File | Default | What it changes |
|---|---|---|---|
LABEL | script.js | Wake-up call | The label of the button at rest. |
TIME | script.js | 7:00 | The wake-up time that rolls into the pill. |
ROOM | script.js | 412 | The room number. |
WAIT | script.js | 1.6 | The seconds the front desk rings before confirming. |
SPRING | script.js | 1 | How much the pill bounces when it changes width. |
SUNRISE | script.js | 1.1 | The seconds of the sun rising and the night turning into dawn. |
HOLD | script.js | 2.6 | The seconds the autopilot leaves the wake-up call booked. |
IDLE | script.js | 1.2 | The seconds before the autopilot starts. |
--sole | style.css | #ffc27a | The colour of the rising sun. |
--alba-bassa | style.css | #c9735c | The warm dawn colour at the bottom of the pill. |
In the app or room page of a hotel, a holiday home or a ship: booking a wake-up call with the front desk in one tap, seeing that the request arrived and being able to cancel it. It also works for other front desk requests, by changing the label and the time.
The pill keeps the same height as on desktop and never goes past 90% of the width; the finger taps like the mouse. Without hover the light stays off and the moon does not tilt.
No springs, rocking or rising: the faces change with fades, the width changes at once, the handset stays still with its waves on, the sun and the tick appear already in place and the dawn fades in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.6 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.