Skip to content
animorio
IT
Back to the library

Four-tile transition

Transitions, HoverGSAP, CSS onlyAdvancedCompressed weight: Demo 12 KBGSAP 28 KBFreeDownload the zip

The transition between two pages of the shop of an invented outdoor brand, Northvale: from the grid of four categories to the category page. Tap Footwear and the tile grows to fill the page while the others step aside, a seam of light runs across it in a cross and the tile splits into four: the pieces come apart on a spring, each takes a nearby tint, its icon draws itself, the name rises, the count and the price come in. At the top All categories, the breadcrumbs, the title out of a slot with the total counting up and the filters arrive. All categories runs the journey backwards: the pieces close into one tile and the tile goes home to its place in the grid.

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>
<!--
  "Four-tile transition" 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>Northvale outdoor</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 shop of an invented outdoor brand, Northvale: four category tiles. Tap one and the tile grows into the
       category page, a seam of light runs across it and the tile splits into its four subcategories, each taking its
       own shade, icon, count and price. All categories closes the seams and the tile shrinks back into the grid -->
  <svg class="simboli" aria-hidden="true">
    <symbol id="i-boot" viewBox="0 0 48 48"><path pathLength="1" d="M13 8h10v13l7.5 3.6c6.4 1.3 11.5 4.4 11.5 9.4v3.5H11V10z" /><path pathLength="1" d="M11 38.5h31M18 13.5h5M18 18h5" /></symbol>
    <symbol id="i-runner" viewBox="0 0 48 48"><path pathLength="1" d="M6 31.5c0-3.4 1.3-6.6 3.4-8.6l5.4 3c3.4 2 7.2 3 11.2 3h4.6c5.4 0 10 2.2 11.4 5.4v2.2H6z" /><path pathLength="1" d="M6 36h36M15.5 25.5l2.2-3.2M20 27.4l2-3.2" /></symbol>
    <symbol id="i-sandal" viewBox="0 0 48 48"><path pathLength="1" d="M7 33.5c0-2.8 4-4.8 10.4-4.8h14.2c5.4 0 9.4 2 9.4 4.8v2.5H7z" /><path pathLength="1" d="M14 28.7c2.2-6 8.4-7.6 12-2.6M24.5 28.7c2-5 8-6 11-1.4" /></symbol>
    <symbol id="i-winter" viewBox="0 0 48 48"><path pathLength="1" d="M11 7h13v5H11zM12 12h11v11l7 3c6.4 1.2 12 4.2 12 9v3H10z" /><path pathLength="1" d="M10 38h32M14.5 16h4M14.5 20h4" /></symbol>
    <symbol id="i-shell" viewBox="0 0 48 48"><path pathLength="1" d="M17.5 8.5l-9.5 6 3 10 4.5-2V40h17V22.5l4.5 2 3-10-9.5-6c-1.2 3-3.9 4.8-6.5 4.8s-5.3-1.8-6.5-4.8z" /><path pathLength="1" d="M24 13.4V40M28.5 27h2.5" /></symbol>
    <symbol id="i-puffer" viewBox="0 0 48 48"><path pathLength="1" d="M17.5 8.5l-9.5 6 3 10 4.5-2V40h17V22.5l4.5 2 3-10-9.5-6c-1.2 3-3.9 4.8-6.5 4.8s-5.3-1.8-6.5-4.8z" /><path pathLength="1" d="M15.5 22.5h17M15.5 28.4h17M15.5 34.3h17" /></symbol>
    <symbol id="i-fleece" viewBox="0 0 48 48"><path pathLength="1" d="M17.5 8.5l-9.5 6 3 10 4.5-2V40h17V22.5l4.5 2 3-10-9.5-6c-1.2 3-3.9 4.8-6.5 4.8s-5.3-1.8-6.5-4.8z" /><path pathLength="1" d="M24 13.4v9.4M15.5 36h17" /></symbol>
    <symbol id="i-vest" viewBox="0 0 48 48"><path pathLength="1" d="M17.5 8.5l-5 4.6V40h23V13.1l-5-4.6c-1.2 3-3.9 4.8-6.5 4.8s-5.3-1.8-6.5-4.8z" /><path pathLength="1" d="M24 13.4V40M12.5 21c2.6 0 4.4-1.8 4.4-4.6M35.5 21c-2.6 0-4.4-1.8-4.4-4.6" /></symbol>
    <symbol id="i-daypack" viewBox="0 0 48 48"><path pathLength="1" d="M14 15c0-4.6 4.4-7.6 10-7.6s10 3 10 7.6v23.4c0 1-.8 1.8-1.8 1.8H15.8c-1 0-1.8-.8-1.8-1.8z" /><path pathLength="1" d="M18.5 27h11v7.5h-11zM21 7.8c.4-2.4 5.6-2.4 6 0" /></symbol>
    <symbol id="i-trek" viewBox="0 0 48 48"><path pathLength="1" d="M15 14c0-3.6 3.6-6.4 9-6.4s9 2.8 9 6.4v24.6c0 1-.8 1.6-1.6 1.6H16.6c-1 0-1.6-.6-1.6-1.6z" /><path pathLength="1" d="M15 18.5c3 1.6 6 2.2 9 2.2s6-.6 9-2.2M19 27h10v8H19zM22 7.6c0-2.6 4-2.6 4 0" /></symbol>
    <symbol id="i-duffel" viewBox="0 0 48 48"><path pathLength="1" d="M7 21c0-2.4 2-4.4 4.4-4.4h25.2c2.4 0 4.4 2 4.4 4.4v13.2c0 1-.8 1.8-1.8 1.8H8.8c-1 0-1.8-.8-1.8-1.8z" /><path pathLength="1" d="M18 16.6c0-4.8 12-4.8 12 0M7 23h34" /></symbol>
    <symbol id="i-hip" viewBox="0 0 48 48"><path pathLength="1" d="M9 24.5c0-3 2.7-5.3 6-5.3h18c3.3 0 6 2.3 6 5.3v3.4c0 3-2.7 5.3-6 5.3H15c-3.3 0-6-2.3-6-5.3z" /><path pathLength="1" d="M3 26.2h6M39 26.2h6M13 24.2h22" /></symbol>
    <symbol id="i-tent" viewBox="0 0 48 48"><path pathLength="1" d="M6.5 38L24 10l17.5 28z" /><path pathLength="1" d="M3.5 38h41M24 10v28M19.2 38l4.8-9.4 4.8 9.4" /></symbol>
    <symbol id="i-bag" viewBox="0 0 48 48"><path pathLength="1" d="M13 11c0-2 1.8-3.6 4-3.6h14c2.2 0 4 1.6 4 3.6v25c0 3-2.6 5.2-5.8 5.2h-10.4C15.6 41.2 13 39 13 36z" /><path pathLength="1" d="M16.5 15h15M31 19v16" /></symbol>
    <symbol id="i-stove" viewBox="0 0 48 48"><path pathLength="1" d="M12 12.5h24v7c0 3.6-2.8 6.2-6.2 6.2H18.2c-3.4 0-6.2-2.6-6.2-6.2z" /><path pathLength="1" d="M9 12.5h30M17 31l-3.5 8M31 31l3.5 8M24 37.5c-2.6-2.2-2.6-4.6 0-7 2.6 2.4 2.6 4.8 0 7z" /></symbol>
    <symbol id="i-lantern" viewBox="0 0 48 48"><path pathLength="1" d="M18 15h12v19H18zM20 11h8l2 4H18zM16 34h16v4.5H16z" /><path pathLength="1" d="M20.5 11c0-4.4 7-4.4 7 0M24 20.5v8" /></symbol>
    <symbol id="i-freccia" viewBox="0 0 16 16"><path d="M5.5 3.5L10 8l-4.5 4.5" /></symbol>
  </svg>

  <main class="palco" data-palco>
    <section class="app" data-app aria-label="Northvale outdoor shop">
      <header class="testa">
        <p class="marchio">
          <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M2.5 15.5L8 6.5l3.2 5 2-3 4.3 7z" /></svg>
          Northvale
        </p>
        <nav class="voci" aria-label="Shop">
          <span class="voce is-on">Shop</span>
          <span class="voce voce--nascosta">Journal</span>
          <span class="voce voce--borsa">
            <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4.5 7h11l-.8 9.2a1 1 0 0 1-1 .8H6.3a1 1 0 0 1-1-.8z" /><path d="M7.5 7V5.8a2.5 2.5 0 0 1 5 0V7" /></svg>
            Bag
          </span>
        </nav>
      </header>

      <div class="corpo" data-corpo>
        <div class="vista vista--cat" data-cat>
          <div class="cat__testa" data-cat-testa>
            <h1 class="titolo">Shop by category</h1>
            <p class="sotto">Gear for long days outside, made to be mended.</p>
          </div>
          <div class="griglia">
            <button class="tessera" data-tessera="0" aria-label="Footwear, 86 items">
              <span class="tessera__corpo" style="--tinta: #dfe5d7">
                <svg class="glifo"><use href="#i-boot" /></svg>
                <span class="tessera__testo"><span class="tessera__nome">Footwear</span><span class="tessera__conto">86 items</span></span>
                <svg class="tessera__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg>
              </span>
            </button>
            <button class="tessera" data-tessera="1" aria-label="Outerwear, 64 items">
              <span class="tessera__corpo" style="--tinta: #dbe2e7">
                <svg class="glifo"><use href="#i-shell" /></svg>
                <span class="tessera__testo"><span class="tessera__nome">Outerwear</span><span class="tessera__conto">64 items</span></span>
                <svg class="tessera__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg>
              </span>
            </button>
            <button class="tessera" data-tessera="2" aria-label="Packs, 41 items">
              <span class="tessera__corpo" style="--tinta: #ecdccf">
                <svg class="glifo"><use href="#i-trek" /></svg>
                <span class="tessera__testo"><span class="tessera__nome">Packs</span><span class="tessera__conto">41 items</span></span>
                <svg class="tessera__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg>
              </span>
            </button>
            <button class="tessera" data-tessera="3" aria-label="Camp, 57 items">
              <span class="tessera__corpo" style="--tinta: #ebe3cf">
                <svg class="glifo"><use href="#i-tent" /></svg>
                <span class="tessera__testo"><span class="tessera__nome">Camp</span><span class="tessera__conto">57 items</span></span>
                <svg class="tessera__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg>
              </span>
            </button>
          </div>
        </div>

        <div class="vista vista--sub" data-sub aria-hidden="true">
          <div class="sub__testa">
            <div class="sub__riga">
              <button class="indietro" data-indietro data-entra>
                <span class="indietro__dentro">
                  <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3.5L5.5 8l4.5 4.5" /></svg>
                  All categories
                </span>
              </button>
              <p class="briciole" data-entra>Shop<svg viewBox="0 0 16 16" aria-hidden="true"><use href="#i-freccia" /></svg><span data-briciola>Footwear</span></p>
            </div>
            <div class="sub__titolo">
              <div class="fessura"><h2 class="titolo" data-titolo>Footwear</h2></div>
              <span class="sub__conto" data-entra><span data-totale>86</span> items</span>
            </div>
            <div class="filtri" data-filtri>
              <span class="filtro" data-filtro>New in</span>
              <span class="filtro" data-filtro>Waterproof</span>
              <span class="filtro" data-filtro>Repair kit</span>
            </div>
          </div>
          <div class="sub__area" data-area></div>
        </div>

        <div class="pezzi" data-pezzi aria-hidden="true">
          <button class="pezzo" data-pezzo tabindex="-1"><span class="pezzo__corpo"><svg class="glifo"><use /></svg><span class="pezzo__testo"><span class="pezzo__nome"></span><span class="pezzo__dati"><span class="pezzo__conto"></span><span class="pezzo__prezzo"></span></span></span><svg class="pezzo__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg></span></button>
          <button class="pezzo" data-pezzo tabindex="-1"><span class="pezzo__corpo"><svg class="glifo"><use /></svg><span class="pezzo__testo"><span class="pezzo__nome"></span><span class="pezzo__dati"><span class="pezzo__conto"></span><span class="pezzo__prezzo"></span></span></span><svg class="pezzo__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg></span></button>
          <button class="pezzo" data-pezzo tabindex="-1"><span class="pezzo__corpo"><svg class="glifo"><use /></svg><span class="pezzo__testo"><span class="pezzo__nome"></span><span class="pezzo__dati"><span class="pezzo__conto"></span><span class="pezzo__prezzo"></span></span></span><svg class="pezzo__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg></span></button>
          <button class="pezzo" data-pezzo tabindex="-1"><span class="pezzo__corpo"><svg class="glifo"><use /></svg><span class="pezzo__testo"><span class="pezzo__nome"></span><span class="pezzo__dati"><span class="pezzo__conto"></span><span class="pezzo__prezzo"></span></span></span><svg class="pezzo__freccia" viewBox="0 0 16 16"><use href="#i-freccia" /></svg></span></button>
          <div class="pelle" data-pelle>
            <svg class="glifo" data-pelle-glifo><use /></svg>
            <span class="tessera__testo"><span class="tessera__nome" data-pelle-nome></span><span class="tessera__conto" data-pelle-conto></span></span>
          </div>
          <div class="cucitura" data-cucitura>
            <span class="cucitura__riga cucitura__riga--o" data-cucitura-o></span>
            <span class="cucitura__riga cucitura__riga--v" data-cucitura-v></span>
          </div>
        </div>
      </div>
    </section>
    <span class="puntatore" data-puntatore aria-hidden="true">
      <svg viewBox="0 0 24 24"><path d="M5 3.2v15.6l4.3-4.1 2.8 6.3 2.7-1.2-2.8-6.2h5.9z" /></svg>
    </span>
    <p class="sr" aria-live="polite" data-voce></p>
  </main>

  <script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.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 “Four-tile transition” 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 white ground with grain sits the window of the Northvale shop, an invented outdoor brand: at the top the mountain mark, Shop, Journal and Bag; below, Shop by category and four big tiles, each with its own soft tint (sage, mist, clay, sand), a line-drawn icon (the boot, the jacket, the backpack, the tent), the name, the item count and an arrow in a circle. On hover the tile lifts by two pixels, the icon tilts, the name widens and a soft light follows the pointer. Tap one and the others shrink away while the tile flies out to fill the page; a seam of white light crosses it horizontally and vertically, the tile tightens for a breath and splits into four pieces that come apart on a spring, round their corners and each take a nearby tint. In each piece the subcategory icon draws itself, the name rises, the item count counts up from zero and the starting price arrives. At the top All categories, the Shop and Footwear breadcrumbs, the title rising out of a slot with the total counting up and three pill filters come in. All categories closes the four pieces into one tile, the seam fades and the tile shrinks back to its place, with the others coming back and a pixel of settling.

How it works

Four pieces under a skin

Under the flying tile the four pieces of the next page are already there, each the size of a quarter, with only their outer corners rounded. Above them flies a skin that looks like the tile, with its whole background: so no gap shows between the quarters during the flight, and when the skin fades the pieces are left ready to come apart.

Places worked out in pixels

The start is the rectangle of the tile in the grid, the goal is the empty area of the category page: the script measures both with getBoundingClientRect, cuts them into four quarters, without a gap for the flight and with the gap for the split, and GSAP takes the x, y, width, height and border-radius of each piece from one to the other.

The tint in a variable

Each piece reads its colour from a CSS variable, --tinta, which GSAP animates from the category colour to the subcategory one; another variable, --l, turns on the edge of light and the shadow only after the split, because while the pieces are together they must have no seams.

Values to change

NameFileDefaultWhat it changes
VOLOscript.js0.75How long the tile's journey to the page lasts, in seconds.
DIVIDIscript.js0.85How long the split into four pieces lasts, in seconds.
FESSURAscript.js10The gap between the four pieces, in pixels.
MOLLAscript.js1.5The bounce of the pieces as they come apart (0 none).
CUCITURAscript.js1How visible the seam of light before the split is (0 none).
RITORNOscript.js0.65How long the journey back lasts, in seconds.
SOSTAscript.js2.2How long the page stays open in the automatic tour, in seconds.
--boscostyle.css#2c5a44The forest green of the counts, the breadcrumbs and the mark.
--cartastyle.css#faf9f6The warm white of the shop window.

Try them in the Playground

When to use it

For an online shop with many categories (clothing, sport, home, outdoor): whoever taps a category sees the tile become the page and split into its subcategories, so they know at once where they are and where they came from.

On phones

The same animation with adapted measures: the window is sized on the height too and the tiles fit two by two in the box; below 420 pixels Journal and the breadcrumbs hide, below 470 of height the line and the filters.

With reduced motion

No motion: the two pages swap with a fade, with the pieces already split, the icons drawn and the counts at their figure.

Pitfalls

  • Four touching rectangles of the same colour still show a thin line where they meet, because of antialiasing: during the flight a whole skin flies above the pieces, and the pieces show only when the skin fades.
  • A CSS transition on transform and GSAP on the same element chase each other: the arrow of the pieces has its transition only once the page is open, and at the end of the entrance GSAP removes its transform with clearProps so the CSS hover works again.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

Compressed with gzip, the three demo files weigh 12 KB; the libraries: GSAP 28 KB.

Testing

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