Skip to content
animorio
IT
Back to the library

Trattoria tasting menu

Scroll, ImagesGSAP, CSS onlyAdvancedCompressed weight: Demo 10 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The tasting menu of Osteria Brina, a made-up trattoria, in a paper-coloured card that stays still as you scroll: the five courses pass one at a time. The real photo of the dish opens from a small circle, like a plate set down on the table, with a ring of light on its edge and a small turn that settles; the course number is written in words and rolls in its window, the name and the ingredients rise line by line, the glass chip on the photo names the course in Italian and a thin rail between the courses fills up to the one on the table. Lenis smooths the scroll; the photos are real (CC0).

The code

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>
<!--
  "Trattoria tasting 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>The tasting menu of a trattoria, course by course on scroll</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/full-italic.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the tasting menu of Osteria Brina, a made-up trattoria. Scrolling down, the stage stays still and the five
       courses pass one at a time through the card: the real photo of the dish opens from a small circle like a plate
       set on the table, the name and the ingredients rise line by line, the course is written in words and a thin
       rail between the courses fills up to the one on the table -->
  <main>
    <section class="apertura">
      <p class="piccolo">Osteria Brina, since 1987</p>
      <h1 class="titolo">Five courses, <em>one long evening.</em></h1>
      <p class="piccolo piccolo--tenue">
        Scroll to taste the menu
        <svg class="giu" viewBox="0 0 12 16" aria-hidden="true"><path d="M6 1v13M1.5 9.5 6 14l4.5-4.5" /></svg>
      </p>
    </section>

    <section class="menu" data-menu>
      <div class="palco">
        <article class="card" data-card>
          <i class="card__luce" data-luce aria-hidden="true"></i>

          <figure class="foto" data-foto>
            <div class="foto__vetro" data-vetro>
              <div class="piatto" data-piatto><div class="piatto__maschera"><img src="burrata.webp" alt="Burrata with halved datterini tomatoes and a gold fork on a white plate" width="1024" height="683" decoding="async"></div></div>
              <div class="piatto" data-piatto><div class="piatto__maschera"><img src="ravioli.webp" alt="Mushroom ravioli with chives and slices of fried porcini" width="960" height="1449" decoding="async"></div></div>
              <div class="piatto" data-piatto><div class="piatto__maschera"><img src="risotto.webp" alt="Saffron risotto topped with a red prawn and parsley in a deep white dish" width="1024" height="683" decoding="async"></div></div>
              <div class="piatto" data-piatto><div class="piatto__maschera"><img src="filetto.webp" alt="A beef fillet in a glossy red wine jus with a roasted tomato" width="1024" height="681" decoding="async"></div></div>
              <div class="piatto" data-piatto><div class="piatto__maschera"><img src="tiramisu.webp" alt="A slice of tiramisu dusted with cocoa and a sprig of mint" width="1024" height="683" decoding="async"></div></div>
              <i class="anello" data-anello aria-hidden="true"></i>
              <p class="gettone" aria-hidden="true">
                <span class="gettone__finestra"><span class="gettone__striscia" data-gettone>
                  <span>Antipasto</span><span>Primo</span><span>Risotto</span><span>Secondo</span><span>Dolce</span>
                </span></span>
              </p>
            </div>
          </figure>

          <div class="testo">
            <header class="testa">
              <p class="marchio">
                <svg class="marchio__segno" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 15.5h16" /><path d="M6 15.5a6 6 0 0 1 12 0" /><path d="M12 9.5V8" /><path d="M8.5 19h7" /></svg>
                Osteria Brina
              </p>
              <p class="testa__nota">Tasting menu</p>
            </header>

            <p class="portata" aria-hidden="true">
              <span>Course</span>
              <span class="portata__finestra"><span class="portata__striscia" data-numero>
                <span>one</span><span>two</span><span>three</span><span>four</span><span>five</span>
              </span></span>
              <span class="portata__di">of five</span>
            </p>

            <div class="piatti">
              <div class="voce" data-voce>
                <h2 class="voce__nome"><span class="nascosto">Course one. </span>Burrata &amp; datterini</h2>
                <ul class="voce__righe"><li>Burrata from Andria, still warm</li><li>Datterini tomatoes, basil oil</li><li>Flaked salt, toasted bread</li></ul>
                <p class="voce__vino"><svg class="calice" viewBox="0 0 12 16" aria-hidden="true"><path d="M3 1.5h6c0 3.4-1.2 5.6-3 5.6S3 4.9 3 1.5Z" /><path d="M6 7.1v6.4M3.6 14.5h4.8" /></svg>Paired with a Fiano, Campania</p>
                <p class="voce__nota">The burrata comes up from Puglia every Thursday, so we serve it the same night.</p>
              </div>
              <div class="voce" data-voce>
                <h2 class="voce__nome"><span class="nascosto">Course two. </span>Porcini ravioli</h2>
                <ul class="voce__righe"><li>Porcini and sheep ricotta</li><li>Brown butter, fresh chives</li><li>Crisp mushroom shavings</li></ul>
                <p class="voce__vino"><svg class="calice" viewBox="0 0 12 16" aria-hidden="true"><path d="M3 1.5h6c0 3.4-1.2 5.6-3 5.6S3 4.9 3 1.5Z" /><path d="M6 7.1v6.4M3.6 14.5h4.8" /></svg>Paired with a Verdicchio, Marche</p>
                <p class="voce__nota">Rolled by hand every afternoon by Nonna Pia, who still counts them.</p>
              </div>
              <div class="voce" data-voce>
                <h2 class="voce__nome"><span class="nascosto">Course three. </span>Saffron risotto</h2>
                <ul class="voce__righe"><li>Carnaroli rice, saffron threads</li><li>A whole red prawn, seared</li><li>Parsley, a drop of lemon</li></ul>
                <p class="voce__vino"><svg class="calice" viewBox="0 0 12 16" aria-hidden="true"><path d="M3 1.5h6c0 3.4-1.2 5.6-3 5.6S3 4.9 3 1.5Z" /><path d="M6 7.1v6.4M3.6 14.5h4.8" /></svg>Paired with a Vermentino, Liguria</p>
                <p class="voce__nota">Stirred for eighteen minutes, never one more, and rested off the heat.</p>
              </div>
              <div class="voce" data-voce>
                <h2 class="voce__nome"><span class="nascosto">Course four. </span>Beef fillet</h2>
                <ul class="voce__righe"><li>Fillet, rested and sliced</li><li>Red wine jus, roast tomato</li><li>Young asparagus</li></ul>
                <p class="voce__vino"><svg class="calice" viewBox="0 0 12 16" aria-hidden="true"><path d="M3 1.5h6c0 3.4-1.2 5.6-3 5.6S3 4.9 3 1.5Z" /><path d="M6 7.1v6.4M3.6 14.5h4.8" /></svg>Paired with a Nebbiolo, Piedmont</p>
                <p class="voce__nota">From a farm in the Langhe hills, cooked over vine cuttings.</p>
              </div>
              <div class="voce" data-voce>
                <h2 class="voce__nome"><span class="nascosto">Course five. </span>Tiramisù</h2>
                <ul class="voce__righe"><li>Savoiardi soaked in espresso</li><li>Mascarpone, bitter cocoa</li><li>A leaf of mint</li></ul>
                <p class="voce__vino"><svg class="calice" viewBox="0 0 12 16" aria-hidden="true"><path d="M3 1.5h6c0 3.4-1.2 5.6-3 5.6S3 4.9 3 1.5Z" /><path d="M6 7.1v6.4M3.6 14.5h4.8" /></svg>Paired with a Passito, Pantelleria</p>
                <p class="voce__nota">Made at noon and left alone until dinner, as it should be.</p>
              </div>
            </div>

            <div class="binario">
              <div class="binario__linea"><i class="binario__pieno" data-pieno></i></div>
              <ol class="binario__tappe">
                <li><button type="button" data-tappa aria-label="Go to course one"><i></i><span>Burrata</span></button></li>
                <li><button type="button" data-tappa aria-label="Go to course two"><i></i><span>Ravioli</span></button></li>
                <li><button type="button" data-tappa aria-label="Go to course three"><i></i><span>Risotto</span></button></li>
                <li><button type="button" data-tappa aria-label="Go to course four"><i></i><span>Fillet</span></button></li>
                <li><button type="button" data-tappa aria-label="Go to course five"><i></i><span>Tiramisù</span></button></li>
              </ol>
            </div>

            <footer class="conto">
              <p class="conto__prezzo"><span class="conto__cifra">€68</span> per guest</p>
              <p class="conto__vini">Wine pairing <strong>+€36</strong></p>
            </footer>
          </div>
        </article>
      </div>
    </section>

    <section class="apertura apertura--fine">
      <h2 class="titolo titolo--medio">A table for <em>the whole evening.</em></h2>
      <a class="pulsante" href="#"><span>Reserve the tasting</span><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" /></svg></a>
    </section>
  </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/ScrollTrigger.min.js"></script>
  <script src="https://cdn.jsdelivr.net/npm/lenis@1.3.26/dist/lenis.min.js"></script>
  <script src="script.js"></script>
</body>
</html>

Playground

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.

81 values to change

Or ask your AI assistant for it

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 “Trattoria tasting menu” from Animorio and fit it into my site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

At the top of the page of Osteria Brina, a made-up trattoria, the heading “Five courses, one long evening.” invites you down. Then the stage stops and a paper-coloured card stays still, with soft shadows and a thin edge: the photo of the dish on the left, the course on the right (on a phone the photo sits on top). As you scroll the five courses pass: burrata with datterini tomatoes, porcini ravioli, saffron risotto with a red prawn, beef fillet in a red wine jus and tiramisù. Each photo opens from a small circle in the middle of the plate that grows until it covers everything, with a thin ring of light on its edge, while the photo inside arrives slightly zoomed and turned by a few degrees and settles; the photo before, underneath, darkens and loses some colour. Meanwhile “Course one of five” rolls to “two”, “three”, with a small bounce, the frosted glass chip on the photo goes from “Antipasto” to “Primo”, “Risotto”, “Secondo” and “Dolce”, the dish name in italics and the three ingredient lines leave upwards and the new ones rise one after the other from their window, down to the paired wine with its drawn glass. Below, a thin terracotta rail fills up to the stop of the course on the table, which grows taller; clicking a stop glides the page to that course. At the bottom of the card the price, 68 euros per guest and 36 for the wines; with the pointer over it a warm light follows the mouse. The scroll is smooth (Lenis) and everything follows the page, backwards too. At the end “A table for the whole evening.” and the “Reserve the tasting” button.

How it works

A still stage and some numbers

The section is 640vh tall and a 100lvh sticky stage stays still inside it. A GSAP timeline tied to the scroll with scrub SCRUB moves numbers, not elements: the opening of each photo, how covered the one before is, the entry and exit of each course's lines, the rolling word, the chip and the rail. On every update a single function rewrites everything from those numbers.

The plate opening from the circle

Each photo has a mask with a clip-path circle in pixels: the radius goes from OPEN_FROM to the distance from the centre to the farthest corner, with power3.inOut, and is recalculated on resize. A 1px ring of light follows the edge of the circle (a round div sized to the circle, not a second clip-path) and fades as it opens; the photo inside goes from ZOOM to 1 and from TURN degrees to zero, like a plate set down and settling.

The lines that rise

The script wraps the name, each ingredient and the wine in a span inside a window with overflow hidden: coming in they rise from 112% to 0 with expo.out, staggered one after the other, leaving they go up with power2.in. The five courses share one grid cell, so the card never changes height.

The course in words and the chip

“one”, “two”, “three”… are a column of words inside a one-line window: the column moves by -n lines with the ROLL curve (back.out), which gives the small bounce on arrival. The frosted glass chip (backdrop-filter) on the photo does the same with the Italian names of the courses.

The rail between the courses and Lenis

The rail is a 1px element scaled horizontally from 0 to the course on the table; the lit stops and the current one are classes. Each stop is a button that glides the page to its course with lenis.scrollTo. Lenis moves the page with the SMOOTH inertia and calls ScrollTrigger.update on every step, from GSAP's ticker.

Values to change

NameFileDefaultWhat it changes
OPEN_FROMscript.js0.06How big the circle is when the photo starts to open.
ZOOMscript.js1.14How zoomed in the photo is when it starts to open.
TURNscript.js-4How many degrees the photo turns as it settles.
DIMscript.js0.55How dark the photo before gets under the new one.
ROLLscript.js'back.out(1.6)'The curve of the course word rolling.
GRAINscript.js0.07How much film grain lies on the photos.
SCRUBscript.js0.8How many seconds the menu takes to catch up with the scroll.
SMOOTHscript.js1.1How long the page glides with Lenis before stopping, in seconds.

Try them in the Playground

When to use it

For the tasting menu or the food menu of a restaurant, a trattoria, a wine bar or a hotel restaurant: when every dish deserves its own photo and its own moment. Swap the photos in the five img tags of the HTML (the webp files in the folder), the words in the five courses, the colours in :root.

On phones

The same animations at adapted sizes: the photo sits on top, 40% of the card tall, the course below; the rail loses the names of the stops and keeps the marks, and on very short screens the third ingredient line is left out.

With reduced motion

No movement and no Lenis: the photos are already open and cross-fade from one to the next, the course lines change with a fade and the rail jumps to the right stop.

Pitfalls

  • The clip-path circle is in pixels, measured on the photo: in percent the radius would depend on the diagonal and the circle would reach the corners too late or too early. It is recalculated on resize, even halfway through the opening.
  • The light ring cannot live inside the mask (the clip-path would cut it in half): it is a separate round div above the photos, sized like the circle: it is not scaled with transform, or its 1px edge would grow as thick as the scale factor.
  • With Lenis, ScrollTrigger has to hear about the scroll from it: lenis.on('scroll', ScrollTrigger.update) and Lenis's raf in GSAP's ticker, with lagSmoothing(0), or scrub and scroll stutter.
  • The zoom and the turn go on the img, not on the mask, or the circle would turn too and its edges would no longer sit at the centre of the plate.

Libraries

GSAP 3.15.0, ScrollTrigger 3.15.0, Lenis 1.3.26, Mona Sans (font variabile) 5.3.0, Fraunces (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 10 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

Tested on 6 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All animations