Skip to content
animorio
IT
Back to the library

The liquid grid

Hover, TransitionsGSAP, CSS onlyMediumCompressed weight: Demo 3.4 KBGSAP + CustomEase 31 KBFreeDownload the zip

A full-screen grid of cells that re-proportions under the pointer with a long lag, and a pill-shaped logo that snaps open.

Rebuilt from scratch studying arttechreport.com by MoreSleep: the idea is theirs; code, copy and images are ours. Read how it’s made

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>
<!--
  "The liquid 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="it">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>La griglia liquida</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource-variable/mona-sans@5.3.0/standard.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="palco" data-palco>
    <!-- la griglia: le misure stanno in variabili CSS che il puntatore sposta -->
    <div class="griglia" data-griglia aria-hidden="true">
      <div class="colonna colonna--sx">
        <div class="cella c-a"></div>
        <div class="sotto">
          <div class="cella c-b"></div>
          <div class="cella c-c"></div>
        </div>
      </div>
      <div class="colonna colonna--dx">
        <div class="cella c-d"></div>
        <div class="mezzo">
          <div class="cella c-e"></div>
          <div class="cella c-f"></div>
        </div>
        <div class="cella c-g"></div>
      </div>
    </div>

    <p class="lato lato--sx">Rapporto sul movimento</p>
    <p class="lato lato--dx">Edizione di prova</p>

    <!-- il marchio a pastiglie: partono quadrate e si aprono alla larghezza della parola -->
    <h1 class="marchio" aria-label="Rapporto sul movimento">
      <span class="pastiglia pastiglia--quadra"><span class="parola">RAPPORTO</span></span>
      <span class="pastiglia pastiglia--tonda"><span class="parola">sul</span></span>
      <span class="pastiglia pastiglia--quadra"><span class="parola">MOVIMENTO</span></span>
    </h1>
    <p class="suggerimento">Muovi il mouse, o il dito: le celle si spostano con te</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/CustomEase.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.

41 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 “The liquid 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

The screen is divided into thin-bordered cells with different radii: tight corners, wide corners, pill ends. Moving the mouse, columns widen and narrow and rows rise and fall: the grid chases the pointer with a long lag and feels liquid. On entry the grid breathes from slightly smaller to full size and the logo assembles in the middle: three square pills that snap open to their word’s width, and words coming out of a blur. If nobody moves, the grid wanders on its own.

How it works

Sizes in CSS variables

The grid is made of nested grids; column widths and row heights live in variables (--c1, --r1…) used in grid-template-columns and grid-template-rows. Changing one variable re-proportions everything without touching the cells.

The long lag

State lives in an object of numbers; gsap.quickTo makes it chase the pointer position in 1.2 seconds with power3, and on every frame the numbers become CSS variables. The lag is what makes it liquid.

Pills that snap open

The pills start square (as wide as they are tall) and go to their word’s measured width on a custom curve 0.754, 0.007, 0.094, 0.989: still for a long time, then it snaps and brakes. The words arrive from blur(6px).

On its own

If the pointer has not moved for two and a half seconds, a slow curve (two sines at different speeds) takes its place. With a finger the grid follows the touch: the stage has touch-action none.

Values to change

NameFileDefaultWhat it changes
RITARDOscript.js1.2Seconds the grid takes to reach the pointer: higher, more liquid.
MISUREscript.jsc1 34→58vw, r1 70→36%…For each size, the value with the pointer at one end and the other, and on which axis.
SCATTOscript.js0.754, 0.007, 0.094, 0.989The pills’ curve.
border-radius delle cellestyle.cssmistiKeep them different from each other: with a single radius it looks like a table.

Try them in the Playground

When to use it

For the opening of a report, an event or a brand that wants to feel like a living interface. Empty cells are a choice: if you put images in them, keep the same lag.

On phones

The cells follow the finger; without touch they wander on their own. The logo stacks into a column and the side labels disappear.

With reduced motion

Still grid, logo already open.

Pitfalls

  • Set min-width: 0 and min-height: 0 on cells and columns: without them a cell will not shrink below its content and the grid will not narrow.
  • Do not update the variables on every pointermove directly: the lag is the point. Use quickTo on numbers and write the variables once per frame.
  • Measure word widths after document.fonts.ready and clear the fixed width at the end of the entrance (clearProps), or rotating the screen pushes the word out of its pill.
  • The automatic drift must stop when someone moves the pointer, otherwise the two fight over the grid.

Libraries

GSAP 3.15.0, CustomEase (GSAP) 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 3.4 KB; the libraries: GSAP + CustomEase 31 KB.

Testing

Tested on 27 September 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