
The liquid grid
Hover, Transitions
The bag of a made-up homeware shop, with real photos of its two products, in the clean style of today’s products: press Checkout and the pill itself becomes the payment page, widening and rising until it fills everything while keeping its colour, the word Checkout flies up and becomes the title as it gains weight and width, the price flies into the Pay button and the rows of the form rise one after another. The back arrow runs it all in reverse and the page folds back into the button.
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>
<!--
"Checkout button transition" 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>Larkfield, checkout transition</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>
<!-- the bag of a made-up homeware shop. Press Checkout and the pill itself grows into the payment page, keeping its
colour: the word Checkout rises and becomes the page title, the price flies into the Pay button and the fields
come up one after another. The back arrow runs the whole thing in reverse and folds the page into the button. -->
<main class="palco" data-palco>
<section class="borsa" data-borsa aria-label="Your bag">
<header class="borsa__testa">
<span class="marchio">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4 15.5c2.6-6.4 6.3-9.6 12-11-1.2 5.7-4.6 9.4-11 11.6" /><path d="M7.4 12.6c1.8-1.1 3.4-2.6 4.8-4.6" /></svg>
<span data-shop>Larkfield</span>
</span>
<span class="borsa__conto">Bag <span class="borsa__numero">2</span></span>
</header>
<ul class="righe">
<li class="riga">
<span class="miniatura"><img src="tazza.webp" alt="A speckled oat glazed mug on a wooden table" width="300" height="300" decoding="async"></span>
<span class="riga__nome">Speckled mug<span class="riga__nota">Oat, 350 ml</span></span>
<span class="riga__prezzo">$34.00</span>
</li>
<li class="riga">
<span class="miniatura"><img src="strofinaccio.webp" alt="A sage checked linen tea towel, close up" width="300" height="300" decoding="async"></span>
<span class="riga__nome">Linen tea towel<span class="riga__nota">Sage, 50 by 70 cm</span></span>
<span class="riga__prezzo">$52.00</span>
</li>
</ul>
<dl class="conti">
<div class="conti__riga"><dt>Subtotal</dt><dd>$86.00</dd></div>
<div class="conti__riga"><dt>Shipping</dt><dd>Free</dd></div>
</dl>
<button class="cassa" type="button" data-cassa>
<span class="cassa__fondo" data-cassa-fondo></span>
<span class="cassa__testo" data-cassa-testo>Checkout</span>
<span class="cassa__destra">
<span class="cassa__prezzo" data-cassa-prezzo>$86.00</span>
<svg class="cassa__freccia" viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9.5M8.6 4l4 4-4 4" /></svg>
</span>
</button>
</section>
<section class="pagina" data-pagina aria-hidden="true" aria-label="Checkout">
<div class="pagina__fondo" data-pagina-fondo></div>
<div class="pagina__dentro">
<div class="barra" data-entra>
<button class="indietro" type="button" data-indietro aria-label="Back to bag">
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3.5L5.5 8l4.5 4.5" /></svg>
</button>
<span class="sicuro">
<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="3.5" y="7" width="9" height="6.5" rx="1.6" /><path d="M5.6 7V5.3a2.4 2.4 0 0 1 4.8 0V7" /></svg>
Secure checkout
</span>
</div>
<h1 class="pagina__titolo" data-titolo>Checkout</h1>
<p class="pagina__sotto" data-entra>Contact and payment, two items from <span data-shop>Larkfield</span></p>
<div class="gruppo">
<label class="campo" data-entra data-campo="email">
<span class="campo__nome">Email</span>
<span class="campo__valore"><span data-email></span><span class="cursore" data-cursore></span></span>
</label>
<label class="campo" data-entra data-campo="carta">
<span class="campo__nome">Card</span>
<span class="campo__valore">
<svg class="chip" viewBox="0 0 22 16" aria-hidden="true"><rect x=".6" y=".6" width="20.8" height="14.8" rx="3" /><rect x="3.6" y="4.6" width="5.4" height="4.2" rx="1" /><path d="M3.6 11.6h9" /></svg>
4242 4242 4242 4242
</span>
</label>
<div class="campo campo--doppio" data-entra>
<label class="campo__meta"><span class="campo__nome">Expiry</span><span class="campo__valore">08 / 28</span></label>
<label class="campo__meta"><span class="campo__nome">CVC</span>
<span class="campo__valore"><svg class="nascosto" viewBox="0 0 26 6" aria-hidden="true"><circle cx="3" cy="3" r="2.2" /><circle cx="13" cy="3" r="2.2" /><circle cx="23" cy="3" r="2.2" /></svg></span>
</label>
</div>
</div>
<div class="totale" data-entra><span>Total</span><span class="totale__cifra">$86.00</span></div>
<button class="paga" type="button" data-paga data-entra>
<span class="paga__fondo"></span>
<span class="paga__testo">Pay</span>
<span class="paga__prezzo" data-paga-prezzo>$86.00</span>
</button>
</div>
</section>
<span class="volo volo--titolo" data-volo-titolo aria-hidden="true">Checkout</span>
<span class="volo volo--prezzo" data-volo-prezzo aria-hidden="true">$86.00</span>
<svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2l13.6 8.1-6 1.3-2.9 5.6z" /></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.
50 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 “Checkout button transition” from Animorio and fit it into my siteOn click the pill is measured against the stage and the page’s black background is placed exactly on top of it, with the same height and a radius of half the height. The pill’s own background switches off in the same instant: the viewer still sees the button.
The background widens to the full width with expo.inOut in OPEN seconds; the height starts a beat later, at 8 per cent, and the radius goes to zero with power3.in, so the corners stay round while the shape still reads as a button.
A copy of the word Checkout leaves the label’s place in the button and flies to the place of the title, already laid out and hidden: position, font size and the two axes wght and wdth move together. On arrival the copy disappears and the real title shows.
The page rows rise RISE pixels, STAGGER seconds apart, with back.out(1.35): they pass the mark by a pixel and come back. The price flies into the Pay button once it has arrived, and the button swells by 3.5 per cent and settles.
On the way back the pill is measured as if the bag were already at full size; the rows leave from the bottom in two tenths, the page folds first in height and then in width, and the pill lands with elastic.out.
| Name | File | Default | What it changes |
|---|---|---|---|
SHOP | script.js | Larkfield | The name of the shop. |
EMAIL | script.js | maya@larkfield.co | The email that types itself in on the payment page. |
OPEN | script.js | 0.85 | How many seconds the pill takes to grow into the page. |
CLOSE | script.js | 0.7 | How many seconds the page takes to fold back into the pill. |
STAGGER | script.js | 0.06 | Seconds between one row of the form and the next. |
RISE | script.js | 16 | How many pixels the rows rise as they come in. |
SINK | script.js | 0.95 | How small the bag gets behind the page. |
PAUSE | script.js | 2.4 | Seconds the demo stays on the payment page. |
--scuro | style.css | #121214 | The colour of the pill and the page. |
--accento | style.css | #7b6cff | The accent: the caret, the field line, the padlock. |
For the step from the cart to the payment in an online shop, for a button that opens a full-screen page or panel, or to show on a landing page how an app goes from a summary to the action.
The same transition with adapted sizes: the bag and the page are sized on the height too, the form rows are lower, the page fills the whole screen.
No flights or movement: the page fades in with the title, the price and the email already in place, and fades out.
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 6 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.