Skip to content
animorio
IT
Back to the library

Stacked glass slabs

Scroll, HoverGSAP, CSS onlyMediumCompressed weight: Demo 7.6 KBGSAP + ScrollTrigger 45 KBLenis 5.3 KBFreeDownload the zip

Scroll inside the preview

The features section of a made-up AI app, on near black: as you scroll, four glass slabs, one per feature, come down one at a time and settle on a pile seen from above, with a soft landing one pixel too low and back. A beam of light runs through the pile: the slab on top takes all of it and shows its feature alive (a field that types, a switch that flips, a chart that draws, a link that gets copied), the ones underneath take less and less, each in its own tint and a little further aside, as if the glass bent it.

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>
<!--
  "Stacked glass slabs" 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>Lumetra</title>
  <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>
  <!-- the features of Lumetra, a made-up AI workspace. The stage sticks while you scroll: four glass slabs come down
       one at a time and settle on a pile seen from above, a beam of light runs through the pile and every slab underneath
       takes its own tint; the one on top shows its feature alive. -->
  <main>
    <section class="corsa" data-corsa>
      <div class="palco" data-palco>
        <header class="testa">
          <div class="marchio">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M10 2.5 17 6.5 10 10.5 3 6.5z"/><path d="M3 10l7 4 7-4"/><path d="M3 13.5l7 4 7-4"/></svg>
            <span>Lumetra</span>
          </div>
          <span class="testa__lato">Features</span>
        </header>

        <div class="scena" data-scena>
          <div class="fascio" data-fascio aria-hidden="true"></div>
          <div class="inclina" data-inclina>
            <div class="pila" data-pila>
             <div class="giro" data-giro>
              <div class="ombra-terra" data-terra></div>
              <div class="orma" data-orma></div>

              <!-- write -->
              <article class="lastra" data-lastra style="--tinta: 120, 214, 255">
                <i class="lastra__spessore"></i>
                <div class="lastra__vetro">
                  <i class="lastra__luce"></i>
                  <div class="lastra__dentro">
                    <p class="etichetta"><svg viewBox="0 0 20 20"><path d="M4 15.5 14.5 5a1.8 1.8 0 0 1 2.5 2.5L6.5 18H4z"/></svg>Write</p>
                    <div class="campo" data-campo>
                      <span class="campo__testo" data-scritto></span><i class="campo__cursore" data-cursore></i>
                    </div>
                    <div class="campo__piede"><span>Draft with Lumetra</span><span class="tasto">Enter</span></div>
                  </div>
                </div>
              </article>

              <!-- automate -->
              <article class="lastra" data-lastra style="--tinta: 166, 140, 255">
                <i class="lastra__spessore"></i>
                <div class="lastra__vetro">
                  <i class="lastra__luce"></i>
                  <div class="lastra__dentro">
                    <p class="etichetta"><svg viewBox="0 0 20 20"><path d="M11 2 4 11h5l-1 7 7-9h-5z"/></svg>Automate</p>
                    <div class="regola"><span><b>Summarise new calls</b><i>Every weekday, 6 PM</i></span><span class="leva" data-leva><i></i></span></div>
                    <div class="regola spenta"><span><b>Tag action items</b><i>When a doc changes</i></span><span class="leva acceso"><i></i></span></div>
                  </div>
                </div>
              </article>

              <!-- measure -->
              <article class="lastra" data-lastra style="--tinta: 255, 190, 120">
                <i class="lastra__spessore"></i>
                <div class="lastra__vetro">
                  <i class="lastra__luce"></i>
                  <div class="lastra__dentro">
                    <p class="etichetta"><svg viewBox="0 0 20 20"><path d="M3 17h14M5 14V9M10 14V5M15 14v-3"/></svg>Measure</p>
                    <div class="dato"><span class="dato__cifra" data-cifra>0</span><span class="dato__nota">hours saved this week</span></div>
                    <svg class="grafico" viewBox="0 0 200 60" preserveAspectRatio="none" aria-hidden="true">
                      <path class="grafico__area" data-area d="M0 52 C20 50 30 44 50 42 S80 34 100 30 S140 22 160 14 S190 8 200 6 V60 H0z"/>
                      <path class="grafico__linea" data-linea d="M0 52 C20 50 30 44 50 42 S80 34 100 30 S140 22 160 14 S190 8 200 6"/>
                    </svg>
                  </div>
                </div>
              </article>

              <!-- share -->
              <article class="lastra" data-lastra style="--tinta: 255, 255, 255">
                <i class="lastra__spessore"></i>
                <div class="lastra__vetro">
                  <i class="lastra__luce"></i>
                  <div class="lastra__dentro">
                    <p class="etichetta"><svg viewBox="0 0 20 20"><path d="M8.5 11.5a3.5 3.5 0 0 0 5 0l2.5-2.5a3.5 3.5 0 0 0-5-5l-1 1"/><path d="M11.5 8.5a3.5 3.5 0 0 0-5 0L4 11a3.5 3.5 0 0 0 5 5l1-1"/></svg>Share</p>
                    <div class="link">
                      <span class="link__indirizzo">lumetra.app/q3-review</span>
                      <span class="link__copia" data-copia>
                        <span class="link__rullo" data-rullo><span>Copy</span><span><svg viewBox="0 0 20 20"><path d="M4.5 10.5l3.5 3.5 7.5-8"/></svg>Copied</span></span>
                      </span>
                    </div>
                    <div class="persone"><span class="faccia" style="--c:#7fd3ff">MA</span><span class="faccia" style="--c:#b49cff">JO</span><span class="faccia" style="--c:#ffc58a">RI</span><span class="persone__nota">Shared with your team</span></div>
                  </div>
                </div>
              </article>
             </div>
            </div>
          </div>
        </div>

        <footer class="didascalia">
          <span class="didascalia__rullo" aria-live="polite"><span class="didascalia__righe" data-righe>
            <span><b>Built in layers.</b> Scroll to stack them</span>
            <span><b>Write.</b> Start from one sentence</span>
            <span><b>Automate.</b> Let the routine run itself</span>
            <span><b>Measure.</b> See the time you got back</span>
            <span><b>Share.</b> One link for the whole team</span>
            <span><b>One workspace.</b> Four layers of light</span>
          </span></span>
        </footer>
      </div>
    </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.

46 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 “Stacked glass slabs” 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 near black background there is the Lumetra brand at the top, a soft column of light falling from the middle and, below, a line that says to scroll. As you scroll, the stage stays put and the first glass slab comes down from above through the light: it is seen from above and slightly askew, with the thickness of the glass underneath and a bright edge, and it lands softly, one pixel below its place and back. Inside is its feature, Write, with a field that types itself. Then Automate comes down on top: the pile underneath gives a pixel and comes back, the slab before dims and the light, running through, tints it light blue and shifts a little aside; on top, a switch flips on a spring. Then Measure, with the chart drawing itself and the hours saved climbing, and finally Share, with the Copy button pressing and rolling to Copied. Each slab underneath takes less light, each in its own colour and a little further aside, as if the glass bent it; the shadow on the ground darkens with the weight of the pile. At the end the beam sweeps once from one side of the pile to the other and back to the middle. Below, the caption rolls like a drum to the name of each feature. The pointer turns the pile slightly, on a spring.

How it works

A pile seen from above

The pile has its angle in CSS, rotateX(57deg) rotateZ(-16deg) with transform-style: preserve-3d, and GSAP never touches it. Inside is a wrapper the pointer turns with quickTo and, inside that, the slabs: GSAP only moves their z, their height in the pile.

Glass and its thickness

Each slab has two faces: underneath, the thickness, a rectangle pushed down with translateZ and tinted in the slab’s colour; on top, the glass, with a light diagonal gradient, a thin border and a line of light on the top edge. No backdrop-filter: inside preserve-3d it would flatten everything.

Landing and giving way

A timeline tied to the scroll with scrub brings down one slab every 1.5 timeline seconds: it appears, comes down with power3.out to two pixels below its place and rises back with sine. At the same moment the slabs already down sink a pixel and a half and come back with back.out.

Light running through

The light on each slab is a radial gradient reading two CSS variables, --li (how much) and --lx (where). For the slab d places under the top one, --li is GLOW times 0.62 to the d, and --lx shifts right and left in turn, further each time: the glass seems to bend the beam. The colour comes from --tinta, one per slab.

Features alive

Each feature wakes up in the timeline: the field’s text grows letter by letter with an onUpdate (and deletes itself going back up), the switch knob runs with back.out and widens for a moment, the chart line draws with strokeDashoffset and the figure counts to 12.4, the Copy button squashes and its roller rises to Copied.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the whole stack takes: 2 is twice as long.
GAPscript.js1How far apart the slabs sit in the pile: 1.5 half again.
GLOWscript.js1How strong the beam of light is: 0 switches it off.
BENDscript.js1How far each slab underneath shifts the light aside.
TILTscript.js1How much the pointer turns the pile.
SCRUBscript.js0.7How many seconds the slabs lag behind the scroll.

Try them in the Playground

When to use it

For the features section of an app or SaaS landing page, especially an AI one: each feature is a layer and the pile says they all live together in one place. It suits writing, teamwork and analytics tools.

On phones

The same animation: the slabs are sized on both the width and the height of the stage, so the whole pile fits in the box; a scrolling finger brings the slabs down.

With reduced motion

Nothing comes down and nothing moves: the finished pile, with Share on top and the light already in place, fades in.

Pitfalls

  • The pile’s angle lives in CSS and the pointer’s turn on a wrapper inside it: if GSAP wrote its transform on the pile it would wipe the CSS rotateX and the pile would snap upright.
  • Inside preserve-3d a backdrop-filter or an overflow: hidden on a parent flattens the slabs onto one plane: the glass is made only of gradients and the overflow sits on each slab’s glass, not on the pile.
  • The typing text is tied to the scroll: it must be worked out on every onUpdate from the number of letters, not added one letter at a time, otherwise it stays written going back up.

Libraries

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

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

Testing

Tested on 28 October 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