
Stacking certificates
Hover, Images
The counter card of Maison Ondine, a made-up patisserie, on a warm white background: five pastries on the left, a large real photo on the right. Hovering a name, the pastry photo arrives through a diagonal cut that sweeps across the frame, with a hairline of light on the blade and a slight zoom that settles, while the photo underneath slides aside and dims; going down the list the cut comes from the left, going up from the right. The name takes weight, a raspberry mark follows it on a spring and a glass label on the photo rolls to the hour the pastry came out of the oven. The five photos are real (CC0).
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>
<!--
"Patisserie menu" 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>Patisserie menu, with the photo arriving through a diagonal cut</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/wdth.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/opsz.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/fraunces@5.3.0/opsz-italic.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<!-- the counter card of Maison Ondine, a made-up patisserie. On the left five pastries, on the right a large real
photo. Hovering a name, its photo arrives through a diagonal cut that sweeps across the frame with a hairline of
light on the blade: down the list the cut runs from the left, up the list from the right. A small glass label on
the photo rolls to the hour the batch left the oven. When nobody touches it, a drawn pointer shows it -->
<main class="palco">
<article class="carta" data-carta>
<div class="lista">
<header class="testa">
<p class="marchio">
<svg class="marchio__segno" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 15c2.4-1.6 5.2-1.6 8 0s5.6 1.6 8 0" /><path d="M4 10c2.4-1.6 5.2-1.6 8 0s5.6 1.6 8 0" /></svg>
Maison Ondine
</p>
<p class="testa__giorno">On the counter <em>today</em></p>
</header>
<ul class="dolci" data-dolci>
<li class="dolce" data-dolce data-ora="06:40">
<button class="dolce__tasto" type="button">
<span class="dolce__nome">Croissant au beurre</span>
<span class="dolce__prezzo">€3.20</span>
<span class="dolce__nota">Normandy butter, 27 layers</span>
</button>
</li>
<li class="dolce" data-dolce data-ora="07:15">
<button class="dolce__tasto" type="button">
<span class="dolce__nome">Tarte au citron</span>
<span class="dolce__prezzo">€6.50</span>
<span class="dolce__nota">Amalfi lemon, torched meringue</span>
</button>
</li>
<li class="dolce" data-dolce data-ora="08:05">
<button class="dolce__tasto" type="button">
<span class="dolce__nome">Éclairs, a trio</span>
<span class="dolce__prezzo">€9.60</span>
<span class="dolce__nota">Raspberry, blackcurrant, passion fruit</span>
</button>
</li>
<li class="dolce" data-dolce data-ora="09:30">
<button class="dolce__tasto" type="button">
<span class="dolce__nome">Macarons, box of six</span>
<span class="dolce__prezzo">€12.00</span>
<span class="dolce__nota">Raspberry and rose, rolled in sugar</span>
</button>
</li>
<li class="dolce" data-dolce data-ora="10:50">
<button class="dolce__tasto" type="button">
<span class="dolce__nome">Gâteau chocolat</span>
<span class="dolce__prezzo">€7.40</span>
<span class="dolce__nota">70% dark, by the slice</span>
</button>
</li>
</ul>
<i class="segno" data-segno aria-hidden="true"></i>
</div>
<figure class="foto">
<div class="foto__cornice" data-cornice>
<div class="scatto" data-scatto><img src="croissant.webp" alt="A golden croissant on a white plate, in warm light" width="960" height="640" decoding="async"></div>
<div class="scatto" data-scatto><img src="crostata.webp" alt="A lemon tart with a swirl of torched meringue and a raspberry, on a wooden board with lemons" width="1024" height="683" decoding="async"></div>
<div class="scatto" data-scatto><img src="eclair.webp" alt="Three glazed eclairs, pink, violet and yellow, on a white plate" width="1024" height="690" decoding="async"></div>
<div class="scatto" data-scatto><img src="macarons.webp" alt="Pink sugared macarons on a pale blue background" width="1024" height="683" decoding="async"></div>
<div class="scatto" data-scatto><img src="torta.webp" alt="A slice of dark chocolate layer cake on a white plate, on a wooden table" width="1024" height="683" decoding="async"></div>
<i class="lama" data-lama aria-hidden="true"><i class="lama__filo"></i></i>
<i class="foto__riflesso" aria-hidden="true"></i>
<div class="vetro" aria-hidden="true">
<span class="vetro__nome">Out of the oven</span>
<span class="vetro__ora" data-ora-vetro></span>
</div>
</div>
</figure>
</article>
</main>
<svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2v15.6l4.1-3.9 2.7 6.1 2.6-1.1-2.6-6h5.9Z" /></svg>
<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.
32 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 “Patisserie menu” from Animorio and fit it into my siteA two-column card: the list of pastries (each item is a button, so it works with touch and the keyboard too) and a frame with the five photos stacked, all hidden except the active one.
The new photo moves up one layer and takes a polygon clip-path: its edge runs from a% at the top to (a − SKEW)% at the bottom, and a travels from 0 to 100 + SKEW with expo.inOut. If the chosen pastry sits higher in the list the polygon is mirrored and the cut comes from the right.
The same progress places a hairline of light: centred between the two points of the edge, length from Math.hypot and rotation from Math.atan2, recomputed in pixels every frame, so the hairline stays on the edge even when the window resizes. It fades in and out with the sine of the progress.
The new photo arrives from a 1.1 zoom shifted by 3% and settles with an expo.out longer than the cut; the one underneath slides the other way and drops to brightness(0.55). When the cut ends the photos underneath are hidden and reset.
The name tweens the --w variable that feeds the wght axis, its opacity and six pixels with back.out; the raspberry mark follows the name with a hand-written spring in the GSAP ticker and stretches with its speed. The hour on the glass is made of 0 to 9 rolls that slide with a small stagger.
When nobody touches it, a repeating timeline moves a drawn pointer over the names (down to the bottom, then back up), with a small press on arrival; the first real mouse move, tap or key stops it, and it starts again after five quiet seconds.
| Name | File | Default | What it changes |
|---|---|---|---|
SKEW | script.js | 26 | How far the blade of the cut leans, in percent of the photo width. |
CUT | script.js | 0.95 | How many seconds the cut takes to cross the photo. |
ZOOM | script.js | 1.1 | How zoomed in the new photo is when the cut starts. |
DIM | script.js | 0.45 | How much the photo underneath darkens (0 = not at all). |
SPRING | script.js | 190 | How stiff the spring of the raspberry mark is. |
BOUNCE | script.js | 0.58 | How damped the mark is (lower = more overshoot). |
AUTO_GAP | script.js | 2.3 | How many seconds pass between two pastries when the drawn pointer drives. |
For the menu or counter of a patisserie, a bakery, a cafe or a restaurant; but also for any short list where every item has its own photo: hotel rooms, portfolio projects, products in a collection. Swap the photos in the five img tags of the HTML (the webp files in the folder), the hour in each pastry's data-ora, the colours in :root.
The same animations at adapted sizes: the photo sits on top, the list below with smaller names and without the ingredients line; the cut, the blade, the mark and the hour are the same. You pick a pastry by tapping it.
No movement: the photos cross-fade without cut or zoom, the name does not shift, the mark jumps to the item without a spring, the hour digits change at once and the drawn pointer is not shown.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0, Fraunces (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 8.1 KB; the libraries: GSAP 28 KB.
Tested on 10 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.