
The liquid grid
Hover, Transitions
The page transition of a made-up homeware online shop, Quillhouse: pressing Checkout in the side cart widens the panel into the payment page, the three product rows fly to the top right and compact on top of each other into a stack that becomes the order summary, the total flies to its place and rolls from 206 to 214 dollars, the card fields come in staggered and Checkout turns into Pay. Hovering the stack lifts the rows behind so they show; Back to cart opens the stack back into rows. The thumbnails are real, copyright-free product photos: the stoneware vase, the folded linen, the glass pitcher.
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 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>The Checkout transition with the summary stack</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/full.css">
<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 shop of a made-up homeware brand, Quillhouse: pressing Checkout in the side cart opens the payment page.
The cart rows compact on top of each other into a stack that becomes the order summary, top right,
the total flies to its place and rolls, the card fields come in staggered. Back to cart opens the stack again. -->
<div class="fit" data-fit>
<div class="app" data-app>
<!-- the shop page under the cart -->
<section class="shop" data-shop aria-hidden="true">
<header class="shop__bar">
<span class="brand">Quillhouse</span>
<nav class="shop__nav"><span>Living</span><span>Kitchen</span><span>Textiles</span><span>Journal</span></nav>
<span class="bag">
<svg viewBox="0 0 20 20"><path d="M4.6 7.2h10.8l-.9 9.2a1.4 1.4 0 0 1-1.4 1.3H6.9a1.4 1.4 0 0 1-1.4-1.3Z"/><path d="M7.4 7.2V5.9a2.6 2.6 0 0 1 5.2 0v1.3"/></svg>
<span class="bag__n">3</span>
</span>
</header>
<div class="shop__hero">
<span class="shop__kicker">New in, autumn</span>
<span class="shop__title">Made for slow mornings</span>
</div>
<div class="grid">
<div class="tile"><span class="tile__photo" data-photo="vase"></span><span class="tile__name">Stoneware vase</span><span class="tile__price">$68</span></div>
<div class="tile"><span class="tile__photo" data-photo="throw"></span><span class="tile__name">Linen throw</span><span class="tile__price">$96</span></div>
<div class="tile tile--third"><span class="tile__photo" data-photo="carafe"></span><span class="tile__name">Glass pitcher</span><span class="tile__price">$42</span></div>
</div>
</section>
<div class="scrim" data-scrim></div>
<!-- the side cart panel: it widens into the payment page -->
<div class="drawer" data-drawer></div>
<!-- the cart -->
<section class="cart" data-cart aria-label="Your bag">
<header class="cart__head" data-cart-in>
<span class="cart__title">Your bag</span>
<span class="cart__count">3 items</span>
<span class="close" aria-hidden="true"><svg viewBox="0 0 16 16"><path d="M4.4 4.4l7.2 7.2M11.6 4.4l-7.2 7.2"/></svg></span>
</header>
<ul class="list" data-list>
<li class="row" data-row>
<div class="row__card" data-card>
<div class="row__in" data-in>
<span class="row__photo" data-photo="vase"></span>
<span class="row__info"><span class="row__name">Stoneware vase</span><span class="row__meta">Ash glaze, 1 x $68.00</span></span>
<span class="row__price">$68.00</span>
</div>
</div>
</li>
<li class="row" data-row>
<div class="row__card" data-card>
<div class="row__in" data-in>
<span class="row__photo" data-photo="throw"></span>
<span class="row__info"><span class="row__name">Linen throw</span><span class="row__meta">Natural, 1 x $96.00</span></span>
<span class="row__price">$96.00</span>
</div>
</div>
</li>
<li class="row" data-row>
<div class="row__card" data-card>
<div class="row__in" data-in>
<span class="row__photo" data-photo="carafe"></span>
<span class="row__info"><span class="row__name">Glass pitcher</span><span class="row__meta">Clear, 1 x $42.00</span></span>
<span class="row__price">$42.00</span>
</div>
</div>
</li>
</ul>
<footer class="cart__foot">
<span class="cart__rule" data-cart-in></span>
<div class="cart__sum"><span class="cart__label" data-cart-in>Subtotal</span><span class="slot slot--cart" data-slot-cart></span></div>
<span class="cart__note" data-cart-in>Shipping and taxes calculated at checkout</span>
<span class="cta-slot cta-slot--cart" data-cta-cart></span>
</footer>
</section>
<!-- the payment page -->
<section class="pay" data-pay aria-label="Checkout">
<header class="pay__bar">
<button class="back" type="button" data-back data-pay-in>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M9.8 3.6 5.4 8l4.4 4.4"/></svg>
<span>Back to cart</span>
</button>
<span class="brand brand--small" data-pay-in>Quillhouse</span>
<span class="secure" data-pay-in>
<svg viewBox="0 0 16 16" aria-hidden="true"><rect x="3.6" y="7.2" width="8.8" height="6.4" rx="1.6"/><path d="M5.6 7.2V5.4a2.4 2.4 0 0 1 4.8 0v1.8"/></svg>
Secure checkout
</span>
</header>
<form class="form" autocomplete="off" onsubmit="return false">
<div class="form__head" data-pay-in>
<span class="form__title">Payment</span>
<span class="form__sub">All transactions are secure and encrypted.</span>
</div>
<label class="field field--focus" data-pay-in data-focus>
<span class="field__label">Card number</span>
<span class="field__value">4242 4242 4242 4242<span class="caret" data-caret></span></span>
<svg class="field__card" viewBox="0 0 30 20" aria-hidden="true"><rect x="0.6" y="0.6" width="28.8" height="18.8" rx="3.4"/><rect class="chip" x="4.4" y="6" width="6.4" height="5.2" rx="1.2"/><path d="M4.4 15h9"/></svg>
</label>
<div class="field-row">
<label class="field" data-pay-in>
<span class="field__label">Expiry</span>
<span class="field__value">08 / 29</span>
</label>
<label class="field" data-pay-in>
<span class="field__label">Security code</span>
<span class="field__value">382</span>
</label>
</div>
<label class="field" data-pay-in>
<span class="field__label">Name on card</span>
<span class="field__value">Mara Lindqvist</span>
</label>
<div class="save" data-pay-in>
<span class="switch" data-switch><span class="switch__knob" data-knob></span></span>
<span>Save card for faster checkout</span>
</div>
<span class="cta-slot cta-slot--pay" data-cta-pay></span>
</form>
<aside class="summary" data-summary>
<span class="summary__bg" data-pay-in data-early></span>
<div class="summary__head" data-pay-in data-early><span>Order summary</span><span class="summary__n">3 items</span></div>
<div class="pile" data-pile></div>
<div class="summary__lines">
<div class="line" data-pay-in><span>Subtotal</span><span>$206.00</span></div>
<div class="line" data-pay-in><span>Shipping</span><span>$8.00</span></div>
<span class="summary__rule" data-pay-in data-early></span>
<div class="line line--total"><span data-pay-in>Total</span><span class="slot slot--pay" data-slot-pay></span></div>
</div>
</aside>
</section>
<!-- the two pieces that fly between the pages -->
<span class="total" data-total aria-live="polite"></span>
<button class="cta" type="button" data-cta>
<span class="cta__face" data-cta-face>
<span class="cta__sheen" data-sheen></span>
<span class="cta__labels">
<span class="cta__a" data-cta-a>Checkout</span>
<span class="cta__b" data-cta-b>Pay $214.00</span>
</span>
</span>
</button>
</div>
</div>
<!-- the drawn pointer of the walk on its own -->
<svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.2 5.1 19l4-3.9 2.7 6 2.6-1.2-2.6-5.8 5.6-.3Z"/>
</svg>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/Flip.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.
70 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 transition” from Animorio and fit it into my siteThe three rows, the total and the button are real elements that change parent: Flip.getState measures them, the is-pay class changes the page, the rows move from the cart list to the summary stack, the total and the button to their new places, and Flip.from carries them from the old place to the new one. Rows and button with scale: false (they change width without stretching the words), the total with scale: true, so it grows like a number.
In the stack each row is absolute: the first in front with z-index 3, the second 9 pixels higher and 9 narrower on each side, the third twice that. Flip knows nothing about stacks: it measures where they end and gets there. The cart panel widens to the whole page with the same Flip, and the content of the rows behind fades as they arrive.
The li belongs to Flip, the card inside to the landing settle and the hover fan, the content to the fade: three transforms that never wipe each other. What only leaves or arrives on one page (the title, the fields, the summary background) is marked and fades in a stagger, never the whole folder, or the rows in flight would vanish with it.
Each digit is a column holding 0-9 twice: going up from 206 to 214 the 0 goes to 1 and the 6 rolls past 9 up to 14, then snaps back to 4 unseen; going down, the other way. The columns start from the right, with back.out for the overshoot.
The vase, the linen and the pitcher are three real CC0 and public domain photos, saved as flat webp files next to the page (vaso.webp, plaid.webp, caraffa.webp): the script sets them as the background of the thumbnails and the shop photos from a single map, so whoever copies the demo changes three file names. The photos are wider than tall and the object is not always centred: each has its own background-size and background-position, with a span[data-photo] selector that outweighs the thumbnail classes. Behind, the veil and the blur of the shop stay CSS.
| Name | File | Default | What it changes |
|---|---|---|---|
FLIP_TIME | script.js | 1.05 | The seconds of the move from the cart to the payment page, and back. |
STAGGER | script.js | 0.07 | The seconds between one row and the next as they stack. |
STACK_GAP | script.js | 9 | How many pixels each row shows behind the first one, in the stack. |
PEEK | script.js | 1.4 | How far the stack opens when hovered. |
ROLL_TIME | script.js | 0.95 | The seconds the total's digits take to roll. |
FIELD_STAGGER | script.js | 0.07 | The seconds between one card field and the next as they come in. |
HOLD | script.js | 1.6 | The pause before the drawn pointer starts its round again. |
LOOP | script.js | true | The drawn pointer repeats its round on its own. |
In the step from the cart to the payment of an online shop, especially homeware, furniture, ceramics, textiles or handmade goods: when you want the buyer to see their things arrive in the summary instead of a hard page change. It also works for a booking (the nights and the extras becoming the summary) or for a subscription summary. The colours are --accent, --panel and --soft in the CSS.
The same animations at adapted sizes: when the box is taller than wide the window switches to its tall shape, 440 by 580, with the cart almost full width and, on the payment page, the summary on top with the stack on the left and the total on the right, above the card fields. Everything scales down to fit the box, height included. With a finger you press Checkout and Back to cart.
No flights and no pointer: pressing Checkout the cart fades out and the payment page appears already in place, with the stack, the 214 total and Pay; Back to cart does the same the other way.
GSAP 3.15.0, Flip 3.15.0, Fraunces (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 11 KB; the libraries: GSAP + Flip 37 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.