
The elastic button
Buttons, Hover, Text
The «Check in» button of a made-up airline in the style of product interface pieces, on white: pressed, a dashed runway appears inside the black pill and a small plane taxis from left to right, speeding up, while the pill fills with blue behind it; at the right edge it lifts its nose and takes off out of the pill, leaving its shadow on the runway. The pill widens into the seat you got, «Seat 14A · Boarding 08:40», with a small seat map whose seats light up one after another until only yours stays lit.
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>
<!--
"Flight check-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>The Check in button with the plane taking off</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>
<!-- a black pill: pressed, a small plane taxis along a runway inside it, the fill grows behind it,
it lifts off the right edge; the pill lands as the seat you got, with a little seat map -->
<div class="checkin" data-checkin>
<p class="flight" data-flight>
<span>Wrenair</span>
<span class="flight__dot" aria-hidden="true"></span>
<span>LIS</span>
<svg class="flight__arrow" viewBox="0 0 16 10" aria-hidden="true"><path d="M1 5h13M10 1.5 13.6 5 10 8.5"></path></svg>
<span>AMS</span>
<span class="flight__dot" aria-hidden="true"></span>
<span>WR 482</span>
</p>
<div class="wrap" data-wrap>
<button class="pill" type="button" data-pill data-autoclic aria-live="polite">
<span class="pill__ink" aria-hidden="true"></span>
<span class="pill__fill" data-fill aria-hidden="true"></span>
<span class="pill__runway" data-runway aria-hidden="true"></span>
<span class="face face--idle" data-idle>
<svg class="face__plane" data-mini viewBox="0 0 24 24" aria-hidden="true">
<path d="M21 12.2c0-.9-.7-1.4-1.6-1.4h-4.6L10.4 4H8.6l2.3 6.8H6.6L5 8.6H3.6l1 3.6-1 3.6H5l1.6-2.2h4.3L8.6 20.4h1.8l4.4-6.8h4.6c.9 0 1.6-.5 1.6-1.4Z"></path>
</svg>
<span class="face__label">Check in</span>
</span>
<span class="face face--done" data-done aria-hidden="true">
<svg class="seats" data-seats viewBox="0 0 34 22" aria-hidden="true"></svg>
<span class="done__text"><b data-seat>Seat 14A</b><span class="done__sep" aria-hidden="true"></span><span data-board>Boarding 08:40</span></span>
</span>
</button>
<svg class="plane" data-plane viewBox="0 0 24 24" aria-hidden="true">
<path d="M21 12.2c0-.9-.7-1.4-1.6-1.4h-4.6L10.4 4H8.6l2.3 6.8H6.6L5 8.6H3.6l1 3.6-1 3.6H5l1.6-2.2h4.3L8.6 20.4h1.8l4.4-6.8h4.6c.9 0 1.6-.5 1.6-1.4Z"></path>
</svg>
<span class="shadow" data-shadow aria-hidden="true"></span>
</div>
<p class="note" data-note>
<svg viewBox="0 0 24 24" aria-hidden="true"><path data-check d="m5.5 12.5 4.2 4.2 8.8-9.4"></path></svg>
<span>Boarding pass sent to your inbox</span>
</p>
</div>
<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.
20 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 “Flight check-in button” from Animorio and fit it into my siteThe pill hides its overflow for the fill and the runway, but the plane and its shadow sit beside it, in the same container: that way the plane can leave over the edge without being clipped. Their position is worked out from the pill’s rectangle at the moment of the click.
The fill is a layer with scaleX from zero and its origin on the left. It has no tween of its own while taxiing: on every update of the plane its x is read with gsap.getProperty and turned into the scale of the blue, so the colour always reaches exactly where the plane is.
The taxi is a tween of x with power2.in (it starts slowly and speeds up) and a small yoyo of y of eight tenths of a pixel for the runway joints; the runway is a repeating gradient whose background-position runs backwards with the same curve. The take-off is a second tween: x past the edge, y up, a rotation of minus 16 degrees and scale 1.35, with opacity dropping in the last third; meanwhile the shadow stays down and shrinks.
The map is a small SVG with six seats (backrest and cushion). A timeline of calls lights one seat at a time in an order that looks like a search, then leaves lit only the one of the seat letter, which swells to 1.32 and comes back with elastic.out.
After a few seconds a delayedCall takes away the line and the seat, the pill goes back to the width of «Check in» and the blue leaves with its origin moved to the right, the way the flight went. The autopilot awaits the tweens as promises and stops at the first real touch.
| Name | File | Default | What it changes |
|---|---|---|---|
TAXI | script.js | 1.5 | How many seconds the plane taxis along the pill before taking off. |
LIFT | script.js | 0.75 | How many seconds the take-off lasts, from the edge of the pill to the sky. |
HOLD | script.js | 2.8 | How many seconds the seat stays before «Check in» comes back. |
SEAT | script.js | "14A" | The seat you get: the row and the letter, from A to F. |
BOARDING | script.js | "08:40" | The boarding time. |
SKY | script.js | #2f6bff | The colour that fills the pill behind the plane. |
INK | script.js | #0b0b0c | The colour of the pill at rest. |
For the online check-in button of an airline or a travel app: the wait for the check-in becomes a small take-off, and the button itself tells you your seat and boarding time.
The open pill never goes past the width of the box minus the margins; the plane leaves over the edge but stays inside the box, and a tap does what a click does.
No plane and no runway: the label fades, the pill turns blue with a fade and changes width at once, the seat and the line below fade in with the check already drawn, and the drawn pointer is not shown.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 6.5 KB; the libraries: GSAP 28 KB.
Tested on 30 October 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.