
The liquid grid
Hover, Transitions
The transition between the grid and a recipe page in Tilth, an invented recipe app: four cards with real photos of the dishes seen from above (tomatoes and mozzarella with basil on a plate with little blue flowers, spaghetti with cherry tomatoes and mushrooms, a pumpkin soup with croutons, a falafel bowl with carrot ribbons). On click the dish lifts out of its card and flies with a FLIP transition to the middle of the recipe, turning a few degrees as it lands with its shadow rising and settling, while the ingredients, the times counting up and the named steps come in around it, staggered. Back, and the dish goes home to its card. On hover a card rises on a four layer shadow and its dish turns a little.
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>
<!--
"Recipe grid 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 recipe grid with the dish that flies into the recipe</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>
<!-- Tilth, an invented recipe app: a grid of dish cards. Each dish is a real photo seen from above, drawn round on a
canvas. A click lifts the dish out of its card and flies it (FLIP) to the middle of the recipe,
turning a few degrees as it lands, while the ingredients, the times and the named steps come in around it. -->
<div class="app" data-app>
<section class="view view--grid" data-grid aria-label="Recipes">
<header class="bar">
<span class="brand">
<svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.5c-3.6 3-4.6 6.6-3 10.2M10 2.5c3.6 3 4.6 6.6 3 10.2M10 4v13.5M4 17.5h12"/></svg>
Tilth
</span>
<span class="bar__tabs"><span class="bar__tab is-on">This week</span><span class="bar__tab">Saved</span></span>
<svg class="bar__icon" viewBox="0 0 20 20" aria-hidden="true"><circle cx="8.6" cy="8.6" r="5.2"/><path d="M12.6 12.6l4 4"/></svg>
</header>
<div class="grid__head">
<h1 class="grid__title">Weeknight dinners</h1>
<p class="grid__count">4 recipes, under 30 min</p>
</div>
<div class="grid" data-cards></div>
</section>
<section class="view view--detail" data-detail aria-label="Recipe" aria-hidden="true">
<header class="bar">
<button class="back" type="button" data-back aria-label="Back to recipes">
<svg viewBox="0 0 20 20" aria-hidden="true"><path d="M12 4.5L6.5 10l5.5 5.5"/></svg>
<span>Recipes</span>
</button>
<span class="brand brand--small">Tilth</span>
<svg class="bar__icon bar__icon--save" viewBox="0 0 20 20" aria-hidden="true"><path d="M6 3.5h8v13l-4-3-4 3z"/></svg>
</header>
<div class="detail">
<div class="detail__hero">
<div class="detail__slot plate" data-slot>
<span class="plate__shadow" aria-hidden="true"></span>
<canvas class="plate__dish" data-slot-dish></canvas>
</div>
</div>
<div class="detail__info">
<p class="detail__kicker" data-in data-kicker></p>
<h2 class="detail__title" data-in data-title></h2>
<dl class="times" data-times></dl>
</div>
<div class="detail__cols">
<div class="block">
<h3 class="block__label" data-in>Ingredients</h3>
<ul class="ingredients" data-ingredients></ul>
</div>
<div class="block">
<h3 class="block__label" data-in>Method</h3>
<ol class="steps" data-steps></ol>
</div>
</div>
</div>
</section>
<!-- the dish while it flies: one layer above both views -->
<div class="flyer plate" data-flyer aria-hidden="true">
<span class="plate__shadow" data-flyer-shadow></span>
<canvas class="plate__dish" data-flyer-dish></canvas>
</div>
</div>
<svg class="cursor" data-cursor viewBox="0 0 24 24" aria-hidden="true">
<path d="M5 3.2l13.4 9.1-6.1 1.1 3.5 6.5-2.6 1.4-3.5-6.5-4.5 4.2z"/>
</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.
25 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 “Recipe grid transition” from Animorio and fit it into my siteEach dish is a real photo seen from above, cut square around its plate or bowl (a webp file in the demo folder). The script loads it with new Image() and draws it with drawImage into the cards, the recipe and the flying dish, each at its own size for the screen density: first a round clip on the rim, then a veil of light from the top left, a soft shade just inside the edge and two fine lines on the edge, a dark one and a light one that brightens on the side of the light. The photos arrive a moment after the script: on the load of each one every canvas is drawn again.
The flying dish is a layer above both views, already placed where it has to land and as big as there. The dish in the card and the place in the recipe are measured, and it starts with an offset and a scale that put it back over the card: then it is enough to take x, y and scale to zero and one. On the way back the same in reverse, always staying as big as in the recipe, so the canvas never goes soft.
x and y run on two different curves (power3 and power2), and the path bends instead of going straight. The dish turns TURN degrees with a back.out that passes a little and comes back; its shadow is an element of its own that drifts away and fades halfway, as if the dish were lifted, and settles on arrival. The scale reaches 1.012 and comes back to 1: the extra pixel of the landing.
Label, title, times, ingredients and steps carry data-in and come in staggered by STAGGER seconds; the rules under the ingredients draw with scaleX, the thread of the steps with scaleY, the rings with a back.out, and the numbers of the times count up from zero. The other cards fade starting from the one clicked, with stagger from.
It starts from the load event: a drawn pointer goes to a card, lifts it, presses, waits READ seconds on the recipe, presses Recipes and does the same with another card. It is an async function that waits on GSAP tweens and timelines (which can be awaited like promises) and gsap.delayedCall, never setTimeout. At the first real touch it stops and the pointer fades.
| Name | File | Default | What it changes |
|---|---|---|---|
FLIGHT | script.js | 0.85 | How long the dish flies, in seconds. |
TURN | script.js | 16 | How many degrees the dish turns while it flies. |
LIFT | script.js | 6 | How many pixels a card rises on hover. |
HOVER_TURN | script.js | 7 | How many degrees the dish turns on hover. |
STAGGER | script.js | 0.045 | The delay between the pieces of the recipe coming in, in seconds. |
READ | script.js | 3.2 | How long the walk on its own stays on a recipe, in seconds. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the walk through the two recipes. |
For a food blog, a recipe app, the menu of a restaurant or a meal kit service: wherever a grid of dishes opens the page of the dish and the eye should follow the dish instead of getting lost. The same transition works for products, portfolio pieces or hotel rooms: swap the dish photos for your own (square, with the plate in the middle). The colours are --page, --app, --ink and --accent in the CSS.
The same animations at adapted sizes: the grid becomes two by two, the window is measured on width and height, the script measures the dishes on the card (on resize too), and in the recipe the dish goes to the top left beside the title and the times, with ingredients and steps in two columns below. A finger taps the card and the dish flies the same.
No flight and no turning: the grid and the recipe swap with a fade, with the dish already in place, and the walk on its own opens the two recipes without the pointer; on hover the card only takes the shadow.
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 12 KB; the libraries: GSAP 28 KB.
Tested on 7 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.