
The layered button
Buttons, Hover, Physics
The Schedule pickup button of an invented takeaway, Brace Kitchen, in smoked lacquer with a copper edge in a warm dark room, like a Dribbble shot. Pressed, the pill grows into a small time wheel: the 15 minute slots are flicked with a finger, coast with inertia and click into the band on a spring, and inside it the kitchen’s prep time rolls along with them. Set, the pill closes on Pickup at 19:45, the clock turns into a check and the receipt slides out from under the edge by a hair.
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>
<!--
"Schedule pickup 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 Schedule pickup button with the time wheel</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" data-stage>
<!-- the Schedule pickup button of a takeaway kitchen, smoked lacquer with a copper edge in a warm dark room.
Pressed, the pill grows into a small time wheel: the 15 minute slots roll with inertia and click into the
band, where the kitchen's prep time rolls with them. Set, the pill closes on Pickup at 19:45 and the
receipt slides out from under its edge -->
<div class="pk-wrap" data-wrap>
<div class="pk" data-pk>
<span class="pk__spill" data-spill aria-hidden="true"></span>
<!-- the receipt: hidden under the pill, it slides out by a hair when the slot is set -->
<div class="pk__slip" data-slip aria-hidden="true">
<span class="pk__slip-bars"></span>
<span class="pk__slip-text"><span>Pickup</span> <b data-slip-time>19:45</b> <span data-slip-order>#2817</span></span>
</div>
<div class="pk__body" data-body>
<span class="pk__fill" aria-hidden="true"></span>
<span class="pk__light-box" aria-hidden="true"><span class="pk__light" data-light></span></span>
<span class="pk__glow-box" aria-hidden="true"><span class="pk__glow" data-glow></span></span>
<span class="pk__sweep-box" aria-hidden="true"><span class="pk__sweep" data-sweep></span></span>
<button class="pk__face" type="button" data-face aria-expanded="false" aria-controls="pk-panel">
<span class="pk__disc" aria-hidden="true">
<span class="pk__plate" data-plate></span>
<svg class="pk__clock" data-clock viewBox="0 0 24 24">
<circle class="pk__clock-rim" cx="12" cy="12" r="8.2"/>
<line class="pk__clock-dot" x1="12" y1="4.6" x2="12" y2="5.6"/>
<line class="pk__clock-dot" x1="19.4" y1="12" x2="18.4" y2="12"/>
<line class="pk__clock-dot" x1="12" y1="19.4" x2="12" y2="18.4"/>
<line class="pk__clock-dot" x1="4.6" y1="12" x2="5.6" y2="12"/>
<line class="pk__hand pk__hand--h" data-hour x1="12" y1="12" x2="12" y2="8"/>
<line class="pk__hand pk__hand--m" data-min x1="12" y1="12" x2="12" y2="6.4"/>
</svg>
<svg class="pk__ok" viewBox="0 0 24 24">
<path data-ok-check d="M7.4 12.4l3.1 3.1 6.2-6.6" pathLength="1"/>
</svg>
</span>
<span class="pk__words">
<span class="pk__state" data-state="rest">
<span class="pk__title">Schedule pickup</span>
<span class="pk__sub"><span data-brand>Brace Kitchen</span> · 3 items<span class="pk__wide"> · from <span data-first>19:00</span></span></span>
</span>
<span class="pk__state" data-state="ok">
<span class="pk__title">Pickup at <span data-ok-time>19:45</span></span>
<span class="pk__sub">Kitchen starts <span data-ok-start>19:20</span> · <span data-ok-order>#2817</span></span>
</span>
</span>
<span class="pk__chev" data-chev aria-hidden="true">
<svg viewBox="0 0 24 24"><path d="M8 10.2l4 4 4-4"/></svg>
</span>
</button>
<div class="pk__panel" id="pk-panel" data-panel>
<div class="pk__head">
<span class="pk__head-l">Pickup today</span>
<span class="pk__head-r" data-head-brand>Brace Kitchen</span>
</div>
<div class="pk__wheel" data-wheel tabindex="0" role="spinbutton" aria-label="Pickup time" aria-valuetext="19:15">
<div class="pk__rows" data-rows aria-hidden="true"></div>
<div class="pk__band" data-band aria-hidden="true">
<span class="pk__band-rim"></span>
<span class="pk__prep">
<span class="pk__prep-win"><span class="pk__prep-col" data-prep-col></span></span>
<span class="pk__prep-unit">min prep</span>
</span>
<svg class="pk__meter" data-meter viewBox="0 0 19 12">
<rect x="0" y="8" width="3" height="4" rx="1"/>
<rect x="5.3" y="5.6" width="3" height="6.4" rx="1"/>
<rect x="10.6" y="3.2" width="3" height="8.8" rx="1"/>
<rect x="15.9" y="0.8" width="3" height="11.2" rx="1"/>
</svg>
</div>
</div>
<button class="pk__set" type="button" data-set aria-label="Set pickup time">
<span class="pk__set-plate" data-set-plate></span>
<svg viewBox="0 0 24 24" aria-hidden="true"><path data-set-check d="M7.6 12.3l3 3 5.8-6.2" pathLength="1"/></svg>
</button>
</div>
<span class="pk__edge" aria-hidden="true"></span>
</div>
</div>
</div>
<!-- the drawn pointer of the loop, only while nobody touches the button -->
<svg class="pk__cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.2l13.6 7.6-6 1.4-2.9 5.8z"/>
</svg>
<p class="sr" aria-live="polite" data-live></p>
</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.
39 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 “Schedule pickup button” from Animorio and fit it into my siteThe button is a single box, .pk__body, with a fixed 30 pixel border-radius and hidden overflow: GSAP only changes its height, from 60 to 184 on a spring, so the pill becomes a rounded rectangle without stretching its corners. The face of the button and the wheel panel sit on top of each other and swap with a fade and a few pixels of rise; the wrap around them always keeps the room of the open panel, so the framing never jumps.
A single number, pos, says which slot is in the middle (halfway too). Dragging, pos follows the finger divided by the row height, with a 35% rubber band past the ends; let go, the speed of the last 90 ms becomes inertia that dies with a per frame friction (FRICTION raised to the elapsed time, so it does not depend on the frame rate). Under 2.2 rows a second a spring a little under critical damping pulls it to the nearest slot: it overshoots by about a pixel and settles. The time step is capped at 1/30 s and the ticker stops when the wheel is still.
On every frame each row gets translate3d and rotateX from its distance to the band, under a 380 pixel perspective, and a --k variable from 0 to 1: the CSS uses it for the weight (font-weight with calc), the width (Mona Sans font-stretch), the colour (color-mix) and the length of the tick. A mask fades the drum at the top and the bottom.
In the band a window 16 pixels tall shows a column with every prep time: the column moves by pos times 16 pixels, so the number rolls exactly with the wheel, even halfway through a click. When the middle slot changes the kitchen bars light up, the band twitches by 0.8 pixels and screen readers hear the time and the prep.
On confirm, one timeline: the disc squashes and the check redraws with stroke-dashoffset on pathLength 1, the amber light spreads, the pill closes with expo.out and a small springy scaleX, the hands turn to the chosen time, the amber plate shows under the dark one through a CSS variable, the reflection crosses and the receipt, hidden under the pill, drops by 26 pixels and comes back to 25, one degree crooked. The loop starts from the load event.
| Name | File | Default | What it changes |
|---|---|---|---|
BRAND | script.js | Brace Kitchen | The name of the takeaway, on the small line and at the top of the wheel. |
ORDER | script.js | 2817 | The order number on the receipt. |
FIRST | script.js | 19:00 | The first pickup slot. |
SLOTS | script.js | 9 | How many slots the wheel has. |
STEP | script.js | 15 | Minutes between two slots. |
PREP | script.js | 15,20,20,25,25,30,35,30,25 | The kitchen’s prep minutes for each slot, comma separated. |
START | script.js | 1 | The slot in the band when the wheel opens (0 is the first). |
PICK | script.js | 3 | The slot the loop flicks to and sets. |
FRICTION | script.js | 0.94 | How long a flick coasts: 0.85 short, 0.97 long. |
SPRING | script.js | 1 | How springy the moves are: 0.4 calm, 2 very bouncy. |
HOLD | script.js | 2.4 | In the loop, how many seconds it stays on Pickup at before going back. |
AUTO | script.js | true | The button goes round by itself until someone touches it. |
For the site or app of a restaurant, a pizzeria, a takeaway, a café or a bakery taking orders to collect, or a shop with click and collect: it lets people pick the time in one gesture, shows how long the kitchen takes and confirms the order with the receipt.
On the phone the button is at most 86% of the screen wide and under 380 pixels the small line keeps only the place and the items; the wheel is dragged and flicked with a finger, a slot can be tapped to bring it to the middle, and the light under the finger turns on at the touch instead of on hover.
Nothing moves: the pill changes height at once behind a fade, the wheel jumps straight to the chosen slot without inertia or spring, the clock and the check swap with a fade and the receipt appears already in place.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 13 KB; the libraries: GSAP 28 KB.
Tested on 4 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.