Skip to content
animorio
IT
Back to the library

Scroll bento grid

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

Scroll inside the preview

The features section of a team tool, in the clean style of product interfaces: six rounded tiles start gathered in the middle and, as you scroll, travel to their places in a bento grid one after the other on a short spring. Each tile starts its own small live piece the moment it lands: the revenue chart, the teammates, the switch, the rolling digits, the search that types itself, the routes between regions.

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>
<!--
  "Scroll bento grid" 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>Vantro</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 section of a made-up team tool, Vantro. The stage sticks while you scroll: six rounded tiles of
       different sizes come out from the middle and settle into a bento grid, and each one starts its small live piece
       as it lands: a chart that draws itself, a row of teammates, a switch, a rolling number, a search that types,
       routes between regions -->
  <main>
    <section class="corsa" data-corsa>
      <div class="palco" data-palco>
        <header class="testa">
          <p class="testa__nota">Vantro for teams</p>
          <h2 class="testa__titolo">Everything you ship, <span>in one place</span></h2>
        </header>

        <div class="bento" data-bento>
          <article class="tessera tessera--grafico" data-tessera="grafico">
            <div class="tessera__dentro">
              <div class="riga">
                <p class="etichetta">Revenue</p>
                <p class="variazione"><svg viewBox="0 0 12 12" aria-hidden="true"><path d="M2 8.5 6 4.5l4 4"/></svg>12.4%</p>
              </div>
              <p class="cifra cifra--grande" data-ricavi>$0</p>
              <div class="grafico" data-grafico>
                <svg viewBox="0 0 320 120" preserveAspectRatio="none" aria-hidden="true">
                  <defs>
                    <linearGradient id="area" x1="0" y1="0" x2="0" y2="1">
                      <stop offset="0" stop-color="var(--accento)" stop-opacity=".22"/>
                      <stop offset="1" stop-color="var(--accento)" stop-opacity="0"/>
                    </linearGradient>
                  </defs>
                  <g class="griglia-linee">
                    <path d="M0 30H320M0 60H320M0 90H320"/>
                  </g>
                  <path class="area" data-area d=""/>
                  <path class="linea" data-linea d=""/>
                  <line class="cursore" data-cursore x1="0" y1="0" x2="0" y2="120"/>
                </svg>
                <div class="suggerimento" data-suggerimento>
                  <span data-sugg-valore>$48.2k</span>
                  <span class="suggerimento__data" data-sugg-data>Oct 24</span>
                </div>
              </div>
            </div>
          </article>

          <article class="tessera tessera--persone" data-tessera="persone">
            <div class="tessera__dentro">
              <p class="etichetta">Shared with</p>
              <div class="volti" data-volti>
                <span class="volto" style="--c:#e0e7ff">MO</span>
                <span class="volto" style="--c:#fce7f3">TL</span>
                <span class="volto" style="--c:#dcfce7">IP</span>
                <span class="volto" style="--c:#fef3c7">RS</span>
                <span class="volto volto--altri">+8</span>
              </div>
              <p class="nota">12 people in Design</p>
            </div>
          </article>

          <article class="tessera tessera--interruttore" data-tessera="interruttore">
            <div class="tessera__dentro">
              <div class="riga">
                <p class="etichetta">Auto-deploy</p>
                <button class="interruttore" type="button" role="switch" aria-checked="false" aria-label="Auto-deploy" data-interruttore>
                  <span class="interruttore__pomello"></span>
                </button>
              </div>
              <p class="nota" data-nota-deploy>Off. Deploys wait for you</p>
            </div>
          </article>

          <article class="tessera tessera--numero" data-tessera="numero">
            <div class="tessera__dentro">
              <div class="riga riga--alto">
                <div>
                  <p class="etichetta">Uptime, last 90 days</p>
                  <p class="cifra cifra--media" data-uptime aria-label="99.98%"></p>
                </div>
                <div class="barre" data-barre aria-hidden="true"></div>
              </div>
            </div>
          </article>

          <article class="tessera tessera--ricerca" data-tessera="ricerca">
            <div class="tessera__dentro">
              <div class="campo">
                <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="9" cy="9" r="5.5"/><path d="m13.2 13.2 3.8 3.8"/></svg>
                <span class="campo__testo" data-scritta></span><span class="campo__cursore" data-cursore-testo></span>
                <kbd><svg viewBox="0 0 16 16" aria-hidden="true"><path d="M6 6V4.5A1.5 1.5 0 1 0 4.5 6H11.5A1.5 1.5 0 1 0 10 4.5V11.5A1.5 1.5 0 1 0 11.5 10H4.5A1.5 1.5 0 1 0 6 11.5Z"/></svg>K</kbd>
              </div>
              <ul class="risultati" data-risultati>
                <li><span class="risultati__icona"><svg viewBox="0 0 16 16"><path d="M4 2.5h5l3 3v8H4z M9 2.5v3h3"/></svg></span>Invoice INV-0311, March<span class="risultati__nota">Finance</span></li>
                <li><span class="risultati__icona"><svg viewBox="0 0 16 16"><path d="M4 2.5h5l3 3v8H4z M9 2.5v3h3"/></svg></span>All March invoices<span class="risultati__nota">Report</span></li>
              </ul>
            </div>
          </article>

          <article class="tessera tessera--mappa" data-tessera="mappa">
            <div class="tessera__dentro">
              <div class="riga">
                <p class="etichetta">Edge regions</p>
                <p class="nota nota--destra" data-latenza>38 ms</p>
              </div>
              <svg class="mappa" viewBox="0 0 280 110" preserveAspectRatio="xMidYMid meet" aria-hidden="true" data-mappa>
                <g class="mappa__fondo" data-fondo></g>
                <path class="rotta" data-rotta d="M46 58 C 90 18, 140 18, 170 46"/>
                <path class="rotta" data-rotta d="M170 46 C 196 22, 226 26, 238 52"/>
                <path class="rotta" data-rotta d="M170 46 C 172 70, 160 86, 150 88"/>
                <rect class="nodo" data-nodo x="42" y="54" width="8" height="8" rx="2"/>
                <rect class="nodo" data-nodo x="166" y="42" width="8" height="8" rx="2"/>
                <rect class="nodo" data-nodo x="234" y="48" width="8" height="8" rx="2"/>
                <rect class="nodo" data-nodo x="146" y="84" width="8" height="8" rx="2"/>
              </svg>
            </div>
          </article>
        </div>
      </div>
    </section>

    <footer class="piede">
      <p>Vantro keeps your team’s work in one calm place.</p>
    </footer>
  </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.

43 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 “Scroll bento grid” 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 very light grey background sits the features section of Vantro, a made-up app for teams: an indigo line and the headline «Everything you ship, in one place» above, and below six rounded white tiles with a thin border and a soft shadow. At first the tiles are gathered in the middle, small, faint and slightly turned; as you scroll the stage stays put and the tiles travel out one after the other to their places in the bento grid (a big one on the left, two small, a wide one, two wide ones at the bottom), each on a short spring that overshoots by a hair and comes back. As soon as a tile lands it settles with a small bounce and starts its live piece: revenue counts up to $482,190 while the chart line draws and the area fills, then a dashed cursor and a dark tooltip glide from day to day; four avatars and the «+8» slide into a row; the auto-deploy switch flips on, stretching for a moment; the digits of 99.98% roll into place over thirty daily bars, one of them orange; the search types «march invoices» and shows two results; on the dotted map routes draw between four regions and latency drops to 38 ms. Scroll back up and the tiles gather again and the pieces switch off; scroll down and they start over.

How it works

A real grid, then the move

The bento grid is CSS Grid with named areas (a a b c / a a d d / e e f f; two columns on the phone). The tiles already sit in place: GSAP only moves them towards the middle, measuring for each the distance between its centre and the grid’s with offsetLeft and offsetTop, which ignore transforms. The values are functions and the ScrollTrigger has invalidateOnRefresh: every resize measures again.

One timeline for the whole scroll

A paused timeline holds one fromTo per tile, STAGGER apart, with back.out(SETTLE): the spring that overshoots and comes back. ScrollTrigger drives it with a 0.6 second scrub from top to bottom of the 340vh section; the stage is sticky and 100vh tall. Lenis does the smooth scrolling.

Live pieces start on arrival

Each piece has three functions: rest, start and end. The check lives on the timeline’s onUpdate, not the scroll’s: the scrub keeps moving the grid after the wheel stops, and the tile should light up when it really lands. Below its arrival, with a small margin, the piece goes back to rest.

Chart and digits

The line is a path of Bézier curves built from the thirty values, drawn with stroke-dashoffset (with vector-effect: non-scaling-stroke the dashes are in screen pixels, so the dash is 4000 long rather than the path length); the area is the same path closed with a gradient. The tooltip sits above its point by measuring the chart box. The digits of 99.98% are columns holding 0 to 9 twice, moved with yPercent to the right digit, each a little slower than the one before.

Search, switch and map

The search types the query with a growing counter that cuts the text; the caret blinks with steps(1). The switch stretches to the right before it snaps, with back.out. The map is a grid of tiny squares kept only inside five ellipses, the routes are paths drawn with stroke-dashoffset and the nodes are rounded squares that grow when their route arrives.

Values to change

NameFileDefaultWhat it changes
RIDEscript.js1How much scroll the grid takes to assemble: 2 is twice as long.
SPREADscript.js1How close to the middle the tiles start: 1 all in the middle, 0 already in place.
STAGGERscript.js0.1The gap between one tile and the next, as a share of the scroll.
SETTLEscript.js1.4How much each tile overshoots its place before it settles.
LIVEscript.js1The speed of the live pieces inside the tiles.

Try them in the Playground

When to use it

For the features section of a SaaS landing page, a team app or a dashboard tool: the bento grid tells six things in a single screen, and the live pieces show the product at work instead of describing it.

On phones

The same animation with adapted sizes: the grid becomes two columns and four rows and fits the box, the headline gets smaller, the search keeps a single result and the chart tooltip is hidden.

With reduced motion

The tiles are already in place and fade in; the pieces sit in their final state (the chart drawn, the switch on, 99.98%, the search typed, the routes), with no movement.

Pitfalls

  • Distances from the centre must be measured with offsetLeft and offsetTop, not getBoundingClientRect: the latter already includes GSAP’s move, and on refresh the tiles would start from the wrong places.
  • Checking arrivals in the ScrollTrigger’s onUpdate is not enough: when the wheel stops the scrub keeps going, but the ScrollTrigger no longer calls onUpdate and the last tile would stay off. It belongs on the timeline.
  • Never once: true on a timeline with a ScrollTrigger: opening the page already scrolled down would freeze everything.
  • With vector-effect: non-scaling-stroke and preserveAspectRatio none the chart line stays thin even when its box stretches.

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

Testing

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