
The inchworm menu
Menus, Hover, Transitions
The Call elevator button in the app of Pellham House, a made-up office building: a pill of light brushed aluminium on white, with the two little lift doors on the left and the floor display on the right. Pressed, it sinks and springs back, the arrow lights up in blue and turns down, and the floor rolls down digit by digit from 12 to L, slow at the start, fast in the middle and slow at the end, while a short line runs down its track. Two floors before, Arriving appears; on L two thin rings open out from the button like the chime, the little doors slide apart on a lit cabin and the words become Doors open; then they close with a tiny knock and the button is ready again.
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>
<!--
"Call elevator 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>Call elevator button</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 call button of the Pellham House building app: a pill of soft brushed aluminium with the lift doors on the
left and the floor display on the right. Pressed, it sinks and springs back, the arrow lights up, the floor
rolls down digit by digit from 12 to L, a thin ring opens like the chime, the little doors slide apart on a
lit cabin and the words say Doors open; then they close and it all goes back to rest -->
<div class="lift" data-wrap>
<span class="lift__shadow" data-shadow aria-hidden="true"></span>
<span class="lift__ring" data-ring aria-hidden="true"></span>
<span class="lift__ring" data-ring aria-hidden="true"></span>
<button class="lift__btn" type="button" data-btn data-autoclic aria-label="Call elevator. Lift B is on floor 12">
<span class="lift__body" data-body>
<span class="lift__metal" aria-hidden="true"></span>
<span class="lift__brush" aria-hidden="true"></span>
<span class="lift__shine" data-shine aria-hidden="true"></span>
<span class="lift__spill" data-spill aria-hidden="true"></span>
<span class="lift__row">
<span class="lift__doors" aria-hidden="true">
<span class="lift__cabin" data-cabin>
<span class="lift__cabin-light" data-cabinlight></span>
<span class="lift__cabin-floor"></span>
</span>
<span class="lift__door lift__door--l" data-door><span class="lift__door-face"></span></span>
<span class="lift__door lift__door--r" data-door><span class="lift__door-face"></span></span>
<span class="lift__frame"></span>
</span>
<span class="lift__words">
<span class="lift__stack" aria-hidden="true">
<span class="lift__label" data-label>Call elevator</span>
<span class="lift__label" data-label>On its way</span>
<span class="lift__label" data-label>Arriving</span>
<span class="lift__label" data-label>Doors open</span>
</span>
<span class="lift__stack" aria-hidden="true">
<span class="lift__sub" data-sub>Pellham House · Lift B on <span data-fromword>12</span></span>
<span class="lift__sub" data-sub>Lift B · going down</span>
<span class="lift__sub" data-sub>Lift B · Lobby</span>
<span class="lift__sub" data-sub>Lift B · going up</span>
</span>
</span>
<span class="lift__display" data-display aria-hidden="true">
<span class="lift__arrow">
<svg viewBox="0 0 14 16"><path data-arrow d="M7 13.2V3.2M3 7.1 7 3.1l4 4"/></svg>
</span>
<span class="lift__digits">
<span class="lift__slot lift__slot--tens" data-slot><span class="lift__ch" data-ch>1</span></span>
<span class="lift__slot" data-slot><span class="lift__ch" data-ch>2</span></span>
</span>
<span class="lift__track"><span class="lift__run" data-run></span></span>
</span>
</span>
</span>
</button>
</div>
<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.
28 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 “Call elevator button” from Animorio and fit it into my siteThe display has two slots, tens and units, one line tall with hidden overflow. For each floor the two characters are worked out (the lobby is L); when one changes a new span is created above the slot, the old one leaves at the bottom with a yPercent of 100 and the new one comes in from -100% to 0. Only the digit that changes moves, and when the tens are empty their slot closes from 15 to 0 pixels.
The floor times come from the inverse of power2.inOut: floor k arrives at RIDE times the inverse of k over the number of floors. Each roll lasts 85% of the gap to the next one (between 0.08 and 0.3 seconds) and the digits blur slightly when the gap is short; the last one comes in with a back.out and passes the mark by a pixel.
The click builds a GSAP timeline: the arrow lighting up, the words changing, the track running, the floors as calls at their moments, then the chime, the doors, the wait and the closing. During the round extra clicks are ignored, and the button still presses under the finger.
The rings are pills with a 1.5 pixel border: GSAP animates their inset property from 0 to -13 and -17 pixels, so they widen without thickening the border as a scale would. The doors are two halves sliding by xPercent -86 and 86 with power3.inOut and settling at 84, leaving the edge of each leaf in sight with a back.out; closing, they meet with a 3% bounce.
| Name | File | Default | What it changes |
|---|---|---|---|
FROM_FLOOR | script.js | 12 | The floor the lift starts from (2 to 39). |
RIDE | script.js | 3 | The seconds the lift takes to come down to the lobby. |
HOLD | script.js | 1.9 | The seconds the doors stay open. |
SPRING | script.js | 1 | How springy the press, the digits and the doors are. |
PRESS | script.js | 0.972 | How much the pill shrinks when pressed. |
RINGS | script.js | 2 | How many thin rings open for the chime (0 to 3). |
--accent | style.css | #2f5bff | The blue of the arrow, the moving floors, the chime and the cabin light. |
--metal-lo | style.css | #e6e8ed | The bottom of the button’s aluminium. |
In the app of an office building, a coworking space or a hotel to call the lift from the phone, in a smart building panel or on the page of a residence; and as the button for an action with a real countdown (an order on its way, a turn at the counter, a place in a queue).
The pill narrows to 88% of the screen while staying 60 pixels tall, the small words shorten with an ellipsis if they do not fit and under 360 pixels the text gets half a point smaller. A tap presses and lets go like the mouse, and the soft light comes on where you touch.
No press, rolling, sliding doors or widening rings: the words change with a fade, the floor goes from 12 to L with a fade, the rings appear and fade standing still, the doors fade away on the lit cabin and then come back.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.3 KB; the libraries: GSAP 28 KB.
Tested on 18 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.