
The liquid grid
Hover, Transitions
The four pages of a made-up clay studio, Halvard, each in its own full colour: oat, terracotta, moss and cobalt. Click an item on the menu bar at the bottom and it lifts off as a pill in the colour of the next page, opens into a card in the middle with a highlight crossing it, then swells to cover the screen and becomes the new page's background; meanwhile its word flies up and becomes the huge title. Leaving and arriving get the same care: the old page steps back, the new one arrives one part after the other.
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>
<!--
"Menu item swell 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 page transition where the menu item swells into the page</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 data-page-now="studio">
<!-- the four pages of a made-up clay studio by the harbour, Halvard. Every page has its own full colour. A click on
the menu at the bottom lifts the item off the bar as a pill in the colour of the page that is coming, the pill
opens into a card, the card swells until it covers the screen, and the word of the item flies up to become the
huge title of the new page -->
<header class="top">
<a href="#" class="brand" data-go="studio" aria-label="Halvard clay studio, home">
<svg class="brand__mark" viewBox="0 0 24 24" aria-hidden="true">
<circle cx="12" cy="12" r="8.6"></circle>
<path d="M7.4 14.6c2.8 1.6 6.4 1.6 9.2 0"></path>
</svg>
<span class="brand__name">Halvard</span>
</a>
<a href="#" class="shop" data-go="visit"><span>Book a class</span>
<svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3.5 8h8.5M8.6 4.4 12.2 8l-3.6 3.6"></path></svg>
</a>
</header>
<div class="pages">
<section class="page is-on" data-page="studio" aria-label="Studio">
<p class="eyebrow" data-in>A small clay studio by the harbour</p>
<h1 class="title" data-title>Studio</h1>
<div class="foot">
<p class="text" data-in>Hand-thrown tableware for restaurants and homes, fired twice in a wood kiln.</p>
<div class="card" data-in>
<span class="card__small">Next kiln opening</span>
<span class="card__mid">Sat 22 Nov</span>
</div>
</div>
</section>
<section class="page" data-page="work" aria-label="Work" hidden>
<p class="eyebrow" data-in>Selected pieces</p>
<h1 class="title" data-title>Work</h1>
<div class="foot">
<p class="text" data-in>Plates, bowls and tall jugs, made in small runs of forty and never twice the same.</p>
<div class="card" data-in>
<span class="card__small">This season</span>
<span class="card__mid">128 pieces</span>
</div>
</div>
</section>
<section class="page" data-page="journal" aria-label="Journal" hidden>
<p class="eyebrow" data-in>Notes from the wheel</p>
<h1 class="title" data-title>Journal</h1>
<div class="foot">
<p class="text" data-in>On ash glazes, slow mornings and the kiln that never quite behaves.</p>
<div class="card" data-in>
<span class="card__small">New entry</span>
<span class="card__mid">The blue that took a year</span>
</div>
</div>
</section>
<section class="page" data-page="visit" aria-label="Visit" hidden>
<p class="eyebrow" data-in>Open Thursday to Sunday</p>
<h1 class="title" data-title>Visit</h1>
<div class="foot">
<p class="text" data-in>Come to the studio, sit at the wheel for two hours and take a bowl home.</p>
<div class="card" data-in>
<span class="card__small">Two-hour class</span>
<span class="card__mid">€65 per person</span>
</div>
</div>
</section>
</div>
<!-- the swelling pill and the flying word live above the pages and below the menu -->
<div class="blob" data-blob aria-hidden="true"><span class="blob__shine" data-shine></span></div>
<span class="word" data-word aria-hidden="true"></span>
<nav class="nav" data-nav aria-label="Main">
<span class="nav__hover" data-hover aria-hidden="true"></span>
<span class="nav__pill" data-pill aria-hidden="true"><span class="nav__gloss"></span></span>
<a href="#" class="nav__item is-here" data-go="studio" aria-current="page"><span>Studio</span></a>
<a href="#" class="nav__item" data-go="work"><span>Work</span></a>
<a href="#" class="nav__item" data-go="journal"><span>Journal</span></a>
<a href="#" class="nav__item" data-go="visit"><span>Visit</span></a>
</nav>
<div class="grain" aria-hidden="true"></div>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.5l13 7.2-5.6 1.4-2.8 5.4z"></path></svg>
<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.
46 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 “Menu item swell transition” from Animorio and fit it into my siteOn click the next page is shown with visibility: hidden, so the position and font size of its title can be read: that is where the word will land.
The flying word already has the title's size; it is scaled down (transform-origin top left) until it is as wide as the menu item and moved over it. The trip then brings the scale back to 1: no font-size change, so no jumps.
One div does it all: it starts as the item's rectangle with a radius of half its height, lifts by 10 px, opens into a card in the middle in 0.55 s on power3.inOut, then swells to the edges and a radius of 0 in 0.75 s on expo.inOut. Width, height and radius are written in pixels, so the shadow and the edge of light don't stretch.
When the card covers the screen the colour moves to the page background, the old page hides, the real title takes the word's place and the card disappears: nobody sees the change. Then the title settles from 1.012 on a spring and the rest comes in from 18 px below, 0.08 s apart.
| Name | File | Default | What it changes |
|---|---|---|---|
PRESS | script.js | 0.16 | The seconds of the press on the menu item, before it lifts off the bar. |
LIFT | script.js | 10 | How many pixels the pill rises as it lifts off the bar. |
CARD | script.js | 0.55 | The seconds in which the pill opens into a card in the middle of the screen. |
FILL | script.js | 0.75 | The seconds in which the card swells to cover the screen while the word flies to the title. |
CARD_WIDTH | script.js | 0.62 | How wide the halfway card is, as a share of the width (at most 600 px). |
CARD_RADIUS | script.js | 28 | The corner radius of the halfway card. |
STAGGER | script.js | 0.08 | The seconds between one part of the new page and the next as it comes in. |
SHINE | script.js | 1 | The highlight crossing the card as it opens (1 on, 0 off). |
HOVER_PULL | script.js | 3 | How many pixels the menu items lean towards the pointer. |
AUTO_EVERY | script.js | 1.6 | Left alone, the seconds of rest on each page before the next lap. |
For the site of a studio, a workshop, a small brand or a portfolio with few pages, each in its own colour: when the menu should feel like an object and the page change should start from the click and say at once where you are going.
The same transition with adapted sizes: the bar stays at the bottom centre with narrower items, the title is sized on width and height, the line and the card stack, and in the short box only the card stays. The pill starts from the tapped item; no items leaning towards the pointer.
No swelling pill and no flying word: the new page's colour fades in over 0.35 s and the page fades in; the cream pill jumps to its place.
GSAP 3.15.0, Fraunces (font variabile) 5.3.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.8 KB; the libraries: GSAP 28 KB.
Tested on 8 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.