
The liquid grid
Hover, Transitions
The page of a made-up home goods shop, Wren & Loom, with three products as tiles of colour: Add to bag pulls the cart out from the right like a drawer, the page dims and steps back a breath, the new line comes in at the top with a settle while the others move down, the count on the bag and the subtotal roll and the free shipping bar fills up to Free shipping unlocked, with a tick drawing itself and a thread of light. Remove slides a line away. Minimal style.
A folder that runs on its own: index.html, style.css, script.js and the libraries from a CDN. The React tab holds the same demo as a ready component, which switches its animations off when it leaves the page.
<!doctype html>
<!--
"Cart drawer" 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>Bag, Wren & Loom</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 page of a made-up home goods shop, Wren & Loom: three products as tiles of colour with their name and price.
Add to bag pulls the bag out from the right like a drawer: the page dims and steps back, the new line comes in at
the top while the others move down, the count on the bag rolls, the subtotal rolls and the free shipping bar
fills; at the goal a tick draws itself and a thread of light runs along the bar. Close with the button, Esc or a
click outside -->
<div class="pagina" data-pagina>
<header class="testa">
<span class="marchio">Wren & Loom</span>
<nav class="voci" aria-label="Shop">
<a href="#" data-finto>Living</a>
<a href="#" data-finto>Kitchen</a>
<a href="#" data-finto>Bath</a>
</nav>
<button class="borsa" type="button" aria-label="Open bag, 0 items" data-apri>
<svg viewBox="0 0 24 24" aria-hidden="true"><path class="borsa__corpo" d="M5.2 8.2h13.6l-1 11.1a1.6 1.6 0 0 1-1.6 1.5H7.8a1.6 1.6 0 0 1-1.6-1.5z"/><path class="borsa__manico" d="M8.8 8.2V7a3.2 3.2 0 0 1 6.4 0v1.2"/></svg>
<span class="borsa__conto" aria-hidden="true"><span class="rullo" data-conto></span></span>
</button>
</header>
<main class="vetrina">
<p class="sopra">New this week</p>
<h1 class="titolo">Slow things for the home</h1>
<ul class="prodotti">
<li class="prodotto" data-prodotto="throw" data-nome="Linen throw" data-variante="Sage, 130 × 170" data-prezzo="68" style="--tinta: #a9b39c; --tinta-2: #8e9a81">
<span class="tassello" aria-hidden="true"><span class="tassello__trama"></span></span>
<span class="prodotto__riga"><span class="prodotto__nome">Linen throw</span><span class="prodotto__prezzo">$68</span></span>
<button class="aggiungi" type="button" data-aggiungi>
<span class="aggiungi__piu" aria-hidden="true"><svg viewBox="0 0 12 12"><path d="M6 2v8M2 6h8"/></svg></span>
<span>Add<span class="aggiungi__resto"> to bag</span></span>
</button>
</li>
<li class="prodotto" data-prodotto="mug" data-nome="Stoneware mug" data-variante="Clay, 340 ml" data-prezzo="24" style="--tinta: #c99a7e; --tinta-2: #b48266">
<span class="tassello" aria-hidden="true"><span class="tassello__trama"></span></span>
<span class="prodotto__riga"><span class="prodotto__nome">Stoneware mug</span><span class="prodotto__prezzo">$24</span></span>
<button class="aggiungi" type="button" data-aggiungi>
<span class="aggiungi__piu" aria-hidden="true"><svg viewBox="0 0 12 12"><path d="M6 2v8M2 6h8"/></svg></span>
<span>Add<span class="aggiungi__resto"> to bag</span></span>
</button>
</li>
<li class="prodotto" data-prodotto="candle" data-nome="Beeswax candle" data-variante="Honey, 40 h" data-prezzo="34" style="--tinta: #dcc28e; --tinta-2: #c9aa6e">
<span class="tassello" aria-hidden="true"><span class="tassello__trama"></span></span>
<span class="prodotto__riga"><span class="prodotto__nome">Beeswax candle</span><span class="prodotto__prezzo">$34</span></span>
<button class="aggiungi" type="button" data-aggiungi>
<span class="aggiungi__piu" aria-hidden="true"><svg viewBox="0 0 12 12"><path d="M6 2v8M2 6h8"/></svg></span>
<span>Add<span class="aggiungi__resto"> to bag</span></span>
</button>
</li>
</ul>
</main>
</div>
<div class="velo" data-velo aria-hidden="true"></div>
<aside class="cassetto" role="dialog" aria-modal="true" aria-labelledby="titolo-borsa" aria-hidden="true" data-cassetto>
<span class="cassetto__luce" aria-hidden="true"></span>
<header class="cassetto__testa">
<h2 id="titolo-borsa">Your bag <span class="cassetto__quanti"><span class="rullo" data-quanti></span></span></h2>
<button class="chiudi" type="button" aria-label="Close bag" data-chiudi>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M4 4l8 8M12 4l-8 8"/></svg>
</button>
</header>
<section class="spedizione" data-spedizione>
<p class="spedizione__frase">
<span class="spedizione__finestra">
<span class="spedizione__riga" data-frase>
<span class="spedizione__manca"><span class="rullo" data-manca></span> away from free shipping</span>
<span class="spedizione__fatta"><svg viewBox="0 0 16 16" aria-hidden="true"><path data-spunta-frase d="M3.6 8.4l2.9 2.9 5.9-6.2" pathLength="1"/></svg>Free shipping unlocked</span>
</span>
</span>
</p>
<span class="barra" data-barra>
<span class="barra__pieno" data-pieno></span>
<span class="barra__filo" data-filo></span>
<span class="barra__meta" data-meta>
<svg viewBox="0 0 16 16" aria-hidden="true"><circle class="barra__cerchio" cx="8" cy="8" r="6.6" pathLength="1" data-cerchio/><path class="barra__spunta" d="M5 8.3l2 2 4-4.3" pathLength="1" data-spunta/></svg>
</span>
</span>
</section>
<ul class="righe" data-righe aria-live="polite"></ul>
<p class="vuoto" data-vuoto>Your bag is empty.<span>Free shipping on orders over $100.</span></p>
<footer class="cassetto__piede">
<p class="totale"><span>Subtotal</span><span class="totale__cifre rullo" data-totale></span></p>
<p class="nota">Taxes and duties calculated at checkout.</p>
<button class="cassa" type="button" data-cassa>
<span class="cassa__luce" aria-hidden="true"></span>
<span>Checkout</span>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h9M8.5 4.5L12 8l-3.5 3.5"/></svg>
</button>
</footer>
</aside>
<template data-modello>
<li class="riga">
<span class="riga__dentro">
<span class="riga__tassello" aria-hidden="true"></span>
<span class="riga__testo">
<span class="riga__nome"></span>
<span class="riga__variante"></span>
<span class="quantita">
<button type="button" class="quantita__tasto" aria-label="One less" data-meno><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M2.5 6h7"/></svg></button>
<span class="quantita__numero rullo" data-numero></span>
<button type="button" class="quantita__tasto" aria-label="One more" data-piu><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M6 2.5v7M2.5 6h7"/></svg></button>
</span>
</span>
<span class="riga__destra">
<span class="riga__prezzo rullo" data-prezzo-riga></span>
<button type="button" class="togli" data-togli>Remove</button>
</span>
</span>
</li>
</template>
<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.
49 values to change
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Cart drawer” from Animorio and fit it into my siteThe cart is an aside fixed to the right, min(400px, 92vw) wide, moved out with xPercent: 104. On opening a timeline takes it to xPercent -0.6 in DRAWER seconds with power4.out and then to 0 with sine.inOut: two pixels too far and back, like a drawer reaching its end. At the same time the shade goes to DIM opacity and the page goes to x: -SHIFT (at most 3% of the width, so on a phone the brand never leaves the side) and scale 0.988, so it seems to take a step back. Closing runs it all the other way, the page with back.out.
Before adding the line the positions of the lines already there are read with getBoundingClientRect; the new line goes at the head of the list, the positions are read again and each line starts from y equal to the difference and returns to 0 with back.out (the FLIP trick). The new line comes in from above, small and see-through, with back.out(1.6). Removing a line is the reverse: it slides right and fades, then its height goes to 0 and the others close up by themselves.
Every number is a row of columns from 0 to 9: each column rises with its own yPercent, the rightmost digit first, and when the number of digits changes the width slides from the old to the new. The bar is a fill in scaleX from 0 to subtotal divided by GOAL; at the goal the sentence rolls to its second line, the two ticks draw themselves with strokeDashoffset (autoRound off) and a white thread runs along the bar.
| Name | File | Default | What it changes |
|---|---|---|---|
DRAWER | script.js | 0.6 | Seconds the drawer takes to slide out from the right. |
SHIFT | script.js | 18 | Pixels the page steps back while the drawer is open. |
DIM | script.js | 0.3 | How dark the page behind the drawer gets (0 = none, 1 = black). |
SETTLE | script.js | 0.6 | Seconds a new line takes to settle at the top. |
ROLL | script.js | 0.5 | Seconds the digits take to roll. |
FILL | script.js | 0.8 | Seconds the free shipping bar takes to fill. |
GOAL | script.js | 100 | The subtotal, in dollars, from which shipping is free. |
LIGHT | script.js | 0.9 | Seconds the thread of light takes to run along the bar. |
AUTO | script.js | 1 | Seconds before the page runs through by itself, when nobody touches it. |
For the cart of an online shop that doesn’t want to send the buyer to another page: add, look, change the quantity and go back to the products. The free shipping bar is for when there’s a threshold to reach.
The same animations. The drawer takes almost the whole width and leaves a strip of the dimmed page to close it with a finger; the menu links hide, product name and price go on two lines and the pill just says Add on the narrowest screens. On short screens the tax note and the lines’ variant hide.
No sliding and no bounces: the drawer and the shade fade in, the lines fade in, the digits and the bar change at once, the ticks are already drawn.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP 28 KB.
Tested on 21 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.
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.