Skip to content
animorio
IT
Back to the library

Glass card tasting menu

ScrollGSAP, CSS onlyMediumCompressed weight: Demo 9.7 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

A scroll animation in the premium style of product pieces: the frosted glass card with the tasting menu of a made-up restaurant, Lume, lit from behind by two candle lights. Scrolling down, the seven courses pass one at a time under a glass lens: the one in the lens is sharp and lit, the others blur and fade, the serving time rolls on its digits and the light behind the glass turns from amber to wine red. At the end the button fills up and the table is reserved.

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>
<!--
  "Glass card 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>Lume tasting menu</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="style.css">
</head>
<body>
  <!-- the evening menu of a made-up restaurant, Lume. The stage sticks while you scroll and the seven courses of the
       tasting menu pass one by one under a glass lens inside a frosted card: the course in the lens is sharp and lit,
       the others fade and soften, the serving time rolls on its digits, the candle light behind the glass turns from
       amber to wine. At the end the card reserves the table. -->
  <main>
    <section class="menu" data-menu>
      <div class="stage" data-stage>
        <div class="light light--a" data-light-a aria-hidden="true"></div>
        <div class="light light--b" data-light-b aria-hidden="true"></div>
        <div class="grain" aria-hidden="true"></div>

        <div class="words" data-words>
          <p class="words__brand">
            <svg class="words__logo" viewBox="0 0 16 16" aria-hidden="true"><path d="M8 1.8c2.4 2.6 3.6 4.7 3.6 6.6A3.6 3.6 0 0 1 8 12a3.6 3.6 0 0 1-3.6-3.6C4.4 6.5 5.6 4.4 8 1.8z"/><path d="M8 12v2.2"/></svg>
            Lume <span>Autumn tasting</span>
          </p>
          <h2 class="words__title">Seven courses, one slow&nbsp;evening.</h2>
          <p class="words__line">Scroll through the menu. Each course comes to the glass at the time it reaches your table, with the wine poured beside it.</p>
        </div>

        <div class="frame" data-frame>
          <article class="card" data-card>
            <span class="card__sheen" data-sheen aria-hidden="true"></span>
            <span class="card__glow" aria-hidden="true"></span>

            <header class="head">
              <span class="head__mark" aria-hidden="true">
                <svg viewBox="0 0 16 16"><path d="M8 1.8c2.4 2.6 3.6 4.7 3.6 6.6A3.6 3.6 0 0 1 8 12a3.6 3.6 0 0 1-3.6-3.6C4.4 6.5 5.6 4.4 8 1.8z"/><path d="M8 12v2.2"/></svg>
              </span>
              <div class="head__text">
                <p class="head__title">Lume</p>
                <p class="muted">Autumn tasting menu</p>
              </div>
              <span class="chip">Seven courses</span>
            </header>

            <div class="clock">
              <p class="clock__time" data-time aria-label="Served at 19:30">
                <span class="dg" data-dg><span class="dg__strip"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span class="dg" data-dg><span class="dg__strip"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span class="clock__colon">:</span><span class="dg" data-dg><span class="dg__strip"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span><span class="dg" data-dg><span class="dg__strip"><b>0</b><b>1</b><b>2</b><b>3</b><b>4</b><b>5</b><b>6</b><b>7</b><b>8</b><b>9</b></span></span>
              </p>
              <div class="clock__side">
                <p class="clock__label muted">Served at</p>
                <p class="clock__course" data-course>Amuse-bouche</p>
              </div>
            </div>

            <div class="window" data-window>
              <span class="rail" aria-hidden="true"><span class="rail__fill" data-rail></span></span>
              <span class="lens" data-lens aria-hidden="true"><span class="lens__face"></span></span>
              <ol class="list" data-list>
                <li class="dish" data-dish data-time="19:30" data-kind="Amuse-bouche" data-tone="0">
                  <span class="dish__text"><b>Oyster, green apple</b><small>Dill oil, a drop of sea</small></span>
                  <span class="dish__wine"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 1.8h6l-.4 4.2A2.6 2.6 0 0 1 8 8.4a2.6 2.6 0 0 1-2.6-2.4z"/><path d="M8 8.4v5M5.6 14.2h4.8"/></svg>Franciacorta</span>
                </li>
                <li class="dish" data-dish data-time="19:45" data-kind="Bread" data-tone="0.15">
                  <span class="dish__text"><b>Sourdough, butter</b><small>Rye starter, cultured butter, smoked salt</small></span>
                  <span class="dish__wine"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 1.8h6l-.4 4.2A2.6 2.6 0 0 1 8 8.4a2.6 2.6 0 0 1-2.6-2.4z"/><path d="M8 8.4v5M5.6 14.2h4.8"/></svg>Kombucha</span>
                </li>
                <li class="dish" data-dish data-time="20:05" data-kind="Garden" data-tone="0.5">
                  <span class="dish__text"><b>Salt-baked beetroot</b><small>Sour cherry, walnut, sorrel</small></span>
                  <span class="dish__wine"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 1.8h6l-.4 4.2A2.6 2.6 0 0 1 8 8.4a2.6 2.6 0 0 1-2.6-2.4z"/><path d="M8 8.4v5M5.6 14.2h4.8"/></svg>Etna Rosato</span>
                </li>
                <li class="dish" data-dish data-time="20:30" data-kind="Pasta" data-tone="0.2">
                  <span class="dish__text"><b>Pumpkin tortelli</b><small>Brown butter, sage, aged parmesan</small></span>
                  <span class="dish__wine"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 1.8h6l-.4 4.2A2.6 2.6 0 0 1 8 8.4a2.6 2.6 0 0 1-2.6-2.4z"/><path d="M8 8.4v5M5.6 14.2h4.8"/></svg>Soave</span>
                </li>
                <li class="dish" data-dish data-time="20:55" data-kind="Sea" data-tone="0.05">
                  <span class="dish__text"><b>Turbot, saffron</b><small>Mussels, fennel cooked over embers</small></span>
                  <span class="dish__wine"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 1.8h6l-.4 4.2A2.6 2.6 0 0 1 8 8.4a2.6 2.6 0 0 1-2.6-2.4z"/><path d="M8 8.4v5M5.6 14.2h4.8"/></svg>Vermentino</span>
                </li>
                <li class="dish" data-dish data-time="21:25" data-kind="Main" data-tone="1">
                  <span class="dish__text"><b>Venison, blackberry</b><small>Celeriac, juniper, red wine jus</small></span>
                  <span class="dish__wine"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 1.8h6l-.4 4.2A2.6 2.6 0 0 1 8 8.4a2.6 2.6 0 0 1-2.6-2.4z"/><path d="M8 8.4v5M5.6 14.2h4.8"/></svg>Barolo</span>
                </li>
                <li class="dish" data-dish data-time="21:55" data-kind="Dessert" data-tone="0.6">
                  <span class="dish__text"><b>Chestnut, honey</b><small>Smoked cream, cocoa nib</small></span>
                  <span class="dish__wine"><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M5 1.8h6l-.4 4.2A2.6 2.6 0 0 1 8 8.4a2.6 2.6 0 0 1-2.6-2.4z"/><path d="M8 8.4v5M5.6 14.2h4.8"/></svg>Moscato</span>
                </li>
              </ol>
            </div>

            <footer class="foot">
              <p class="foot__price"><b>&euro;145</b><span class="muted">per guest, wines &euro;85</span></p>
              <button class="btn" type="button" data-btn>
                <span class="btn__fill" data-btn-fill aria-hidden="true"></span>
                <span class="btn__face" data-face>
                  <span class="btn__words" data-btn-words>Reserve a table</span>
                  <svg class="btn__icon" viewBox="0 0 16 16" aria-hidden="true">
                    <path class="btn__arrow" data-arrow d="M3 8h9M8.5 4.2L12.3 8 8.5 11.8"/>
                    <path class="btn__check" data-check pathLength="1" d="M3.4 8.4l3 3 6.2-6.6"/>
                  </svg>
                </span>
              </button>
            </footer>
          </article>
        </div>
      </div>
    </section>
    <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="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.

88 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 “Glass card 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

On a warm near black page a frosted glass card rises: behind it, two soft candle lights, amber at the top and wine red at the bottom, show blurred through the glass. At the top the Lume mark with its drawn flame, ‘Autumn tasting menu’ and the ‘Seven courses’ label; under it, large, the time ‘19:30’ with ‘Served at’ and the name of the course beside it. In the middle a window shows three courses at a time, with names in a serif face, small ingredients and the paired wine on the right with a drawn glass; the middle one sits under a glass lens with a thread of light beneath it, the others are blurred and paler. Scrolling down the list travels: the lens stretches a little while the courses pass and settles a pixel past the mark when one stops, the time rolls digit by digit to that course's hour, the name changes on a small spring, the thin rail on the left fills and the light behind the glass drifts and turns redder with the evening's dishes. After the dessert the ‘Reserve a table’ button gives under the finger, fills from the left with the candle colour, the arrow leaves and a check draws itself: ‘Table reserved’. Scrolling back undoes everything. With the pointer a soft light follows it on the glass and the button can be pressed.

How it works

A stage that holds

The section is 460vh tall with a sticky stage 100lvh tall inside. ScrollTrigger scrubs a paused timeline: each course rests in the lens for a while, then the list slides to the next with power3.inOut.

The list under the lens

A single number, the course you have reached (even halfway between two), moves the list one row at a time. For each course the distance from the lens sets blur, transparency and a scale just a hair smaller; a gradient mask fades the window at top and bottom.

Digits that roll

The time is four columns of digits in windows one em tall. When the course changes each column rolls to its digit with back.out, the hours a moment before the minutes, passing the mark by a hair.

The lens that stretches

Every frame the list's speed becomes a small vertical stretch of the lens through quickTo; when the list stops the lens goes back, and taking a new course it makes an elastic bounce of a pixel and a half.

The evening light and the table

Each course has its tone between amber and wine red: the --tone variable blends between two courses and colours the lights behind the glass, the course name and the thread under the lens. Past the last dish the scroll switches the booking on and the button's spring runs whole on its own.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole menu takes: 2 is twice as long.
SOFTENscript.js1.1How much the courses outside the lens blur, in pixels.
FADEscript.js0.45How much the courses outside the lens fade: 0 none, 1 gone.
ROLLscript.js0.7Seconds the digits of the time take to roll.
STRETCHscript.js1How much the lens stretches while the list travels: 0 never.
GLOWscript.js1How strong the candle lights behind the glass are.

Try them in the Playground

When to use it

For the site of a restaurant, a wine bar or a hotel with its own restaurant: the section that tells the tasting menu course by course, with times and wines, and ends on the button to book the table.

On phones

The same animation with adapted sizes: the headline goes above the card and disappears when the screen is short, rows, digits and button are sized on the height too and the whole card fits in the box; under 340 pixels wide the paired wine is hidden.

With reduced motion

No long scroll and no movement: the card fades in already resting on the 20:30 pasta, with the neighbouring courses readable and unblurred; the button changes with a fade.

Pitfalls

  • A button driven straight by the scrub never bounces: it follows the finger and stops halfway. Here the scroll only decides the state, and the press with its spring runs whole on its own.
  • The lens stretch must be worked out in a ticker, not in the scroll update: when the scroll stops the update no longer comes and the lens would stay stretched.
  • backdrop-filter only blurs what is behind the card in the same context: the candle lights live in the stage, under the card, not inside it.

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 9.7 KB; the libraries: GSAP + ScrollTrigger 45 KB, Lenis 5.3 KB.

Testing

Tested on 2 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