Skip to content
animorio
IT
Back to the library

Watch grid transition

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

The transition of an invented watchmaker's shop, Morrow, between the grid of four watches and the product page, with real photos: tap a watch and its photo lifts off the card with its shadow and grows into the header, moving closer to the dial; a diagonal light runs across the glass with a thin anamorphic streak, the name rises out of a slot, the price rolls digit by digit, calibre, case and strap come in staggered on a spring. Add to bag draws its tick; Back flies the photo home to the right card.

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>
<!--
  "Watch grid 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>Morrow watches</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/newsreader@5.3.0/opsz.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <!-- the shop of an invented watchmaker, Morrow: a grid of four watches. Tap one and its photo lifts off the grid and
       grows into the header of the product page, a light runs across the glass of the dial, the name and the price
       rise, the details come in one after the other. Back flies the photo home to its card -->
  <main class="palco" data-palco>
    <section class="app" data-app aria-label="Morrow watches">

      <div class="vista vista--griglia" data-griglia>
        <header class="testa" data-via>
          <p class="marchio">
            <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="7.2" /><path d="M10 5.6V10l2.8 1.8" /></svg>
            Morrow
          </p>
          <nav class="voci" aria-label="Shop">
            <span class="voce is-on">Watches</span>
            <span class="voce">Straps</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="titoletto" data-via>
          <h1 class="titolo-griglia">The autumn edit</h1>
          <span class="conta">Four pieces, made in small runs</span>
        </div>
        <ul class="orologi" data-orologi></ul>
      </div>

      <div class="vista vista--prodotto" data-prodotto aria-hidden="true">
        <div class="testata" data-testata>
          <div class="testata__foto" data-testata-foto><img alt="" data-testata-img></div>
          <span class="testata__velo" aria-hidden="true"></span>
          <span class="vetro" data-vetro aria-hidden="true">
            <i class="vetro__luce" data-luce></i>
            <i class="vetro__riflesso" data-riflesso></i>
          </span>
          <span class="striscia" data-striscia aria-hidden="true"></span>
        </div>
        <button class="tondo tondo--indietro" type="button" data-indietro aria-label="Back to all watches">
          <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M10 3.5 5.5 8l4.5 4.5" /></svg>
        </button>
        <span class="tondo tondo--cuore" data-cuore aria-hidden="true">
          <svg viewBox="0 0 16 16"><path d="M8 13.2S2.6 10 2.6 6.3A2.8 2.8 0 0 1 8 5a2.8 2.8 0 0 1 5.4 1.3C13.4 10 8 13.2 8 13.2z" /></svg>
        </span>

        <div class="corpo" data-corpo>
          <div class="corpo__testa">
            <div>
              <p class="linea" data-entra data-linea>Atelier line</p>
              <h2 class="nome"><span class="nome__riga"><span class="nome__testo" data-nome>Nero</span></span></h2>
            </div>
            <p class="prezzo" aria-live="off"><span class="prezzo__rulli" data-prezzo></span></p>
          </div>
          <span class="filo" data-filo aria-hidden="true"></span>
          <p class="nota" data-entra data-nota>A slice of marble under domed sapphire.</p>
          <ul class="dettagli" data-dettagli>
            <li class="dettaglio" data-dettaglio>
              <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="4.2" /><path d="M10 2.6v2M10 15.4v2M2.6 10h2M15.4 10h2M4.8 4.8l1.4 1.4M13.8 13.8l1.4 1.4M4.8 15.2l1.4-1.4M13.8 6.2l1.4-1.4" /></svg>
              <span class="dettaglio__nome">Calibre</span>
              <span class="dettaglio__valore" data-calibro>Automatic</span>
            </li>
            <li class="dettaglio" data-dettaglio>
              <svg viewBox="0 0 20 20" aria-hidden="true"><circle cx="10" cy="10" r="5" /><path d="M7.4 5.6 8 2.4h4l.6 3.2M7.4 14.4 8 17.6h4l.6-3.2M15 9.2h1.6v1.6H15" /></svg>
              <span class="dettaglio__nome">Case</span>
              <span class="dettaglio__valore" data-cassa>40 mm steel</span>
            </li>
            <li class="dettaglio" data-dettaglio>
              <svg viewBox="0 0 20 20" aria-hidden="true"><rect x="6.2" y="2.4" width="7.6" height="15.2" rx="2" /><path d="M6.2 11.5h7.6M8.5 13.6h3M8.5 15.4h3" /></svg>
              <span class="dettaglio__nome">Strap</span>
              <span class="dettaglio__valore" data-cinturino>Calfskin</span>
            </li>
          </ul>
          <div class="azioni" data-entra>
            <button class="borsa" type="button" data-borsa>
              <span class="borsa__faccia" data-faccia>
                <svg class="borsa__spunta" viewBox="0 0 16 16" aria-hidden="true"><path data-spunta d="M3.5 8.4l2.8 2.8 6.2-6.4" /></svg>
                <span class="borsa__parole" data-parole>Add to bag</span>
              </span>
            </button>
            <span class="spedizione">
              <svg viewBox="0 0 20 20" aria-hidden="true"><path d="M2.5 6h9v7.5h-9zM11.5 8.5h3.4l2.6 2.6v2.4h-6" /><circle cx="6" cy="14.6" r="1.4" /><circle cx="14.4" cy="14.6" r="1.4" /></svg>
              Free shipping, 2 year warranty
            </span>
          </div>
        </div>
      </div>

      <div class="volo" data-volo aria-hidden="true"><img alt="" data-volo-img></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.

34 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 “Watch grid 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 grey ground with a fine grain sits the Morrow shop app, a warm white card with round corners, a one pixel edge of light and a soft three layer shadow. At the top the mark with its brass dial, Watches, Straps and the Bag pill; below, the serif title ‘The autumn edit’ and four cards in a grid: Nero with its black marble dial, Lagoon with the turquoise strap, Birch with the maple case, Eclipse with the white dial on a wrist, each with its real photo, name, a line and price. The dial always sits in the middle of the card. On hover the card rises three pixels, the shadow lengthens, the photo moves closer and a glass round with an arrow appears at the bottom right. Tap it and the card squeezes a little; the photo lifts off with a shadow that grows and settles, and widens into the page header, with the app's top corners and square bottom ones, while inside the frame the photo moves closer to the dial. Meanwhile the rest of the grid sinks and fades, the farthest cards last. Once there, the photo breathes and a diagonal band of light crosses the glass of the dial, clipped to its circle, with a second softer band and a thin anamorphic streak that lights up as the light passes the centre; then a soft reflection stays on the glass, and on a computer it follows the pointer. The name rises out of a slot one pixel too far and back, the price rolls digit by digit to its number, a hairline draws itself and calibre, case and strap come in one after the other on a spring, each in its tile with a brass icon. Add to bag squeezes, widens, draws its tick and says In your bag. Back closes it all in reverse: the details leave, the name drops, the photo flies home to its card and the card settles by a pixel, while the others come back with a bounce.

How it works

The photo without object-fit

For each photo we know its real size and its dial: centre and radius as fractions. inquadra() works out where the photo goes in any frame: the scale that covers the whole frame (times the zoom wanted), then the offset that brings the dial to the centre, stopped at the edges so the photo never leaves gaps. Card, header and the photo in flight use the same function, so the flight is just a move between two sets of numbers.

A hand made FLIP

On tap we measure the card's frame and the header's. A flying element, above everything, takes the card's size with the photo inside in the same framing, and the card's real photo switches off. Then in an expo.inOut timeline the frame goes to the header (x, y, width, height and corners), the photo inside goes to the header's framing with ZOOM, the shadow grows and comes back. On arrival the real header takes the flying photo's place, on the same pixel.

The glass over the dial

inquadra() also returns where the dial lands in the header: there sits a circle with overflow hidden, as big as the glass. Inside, a diagonal band of light in mix-blend-mode: screen runs from xPercent −120 to 120; above it, a two pixel streak two thirds as wide as the header stretches and lights up halfway through. Afterwards a soft crescent reflection stays.

The name, the price, the details

The name sits in a line with overflow hidden and rises from yPercent 112 to −2, then back to 0. The price is made of columns with the digits 0 to 9 stacked: each column rolls to −digit×10 % with back.out, the last ones slower. The hairline draws with scaleX, the three tiles come in with back.out(MOLLA) staggered by SFALSA, then the button row.

The way back

Back takes the same road in reverse: the page's pieces leave from the last, the flying photo starts from the header and returns to the card's framing, the other cards come back with back.out in order of distance, and the card found again drops a pixel and settles. On resize the photos are framed again and a trip halfway jumps to its end.

Values to change

NameFileDefaultWhat it changes
VOLOscript.js0.85How long the photo's trip to the header lasts, in seconds.
RITORNOscript.js0.7How long the trip back lasts, in seconds.
SOLLEVAscript.js0.7How far the photo lifts in flight: the strength of the shadow, from 0 to 1.
ZOOMscript.js1.35How much closer to the dial the header gets than the card.
LUCEscript.js1.15How long the light takes to cross the glass, in seconds.
MOLLAscript.js1.6The bounce of the details coming in.
SFALSAscript.js0.07The delay between one detail and the next, in seconds.
SOSTAscript.js2.2How long the page stays open in the automatic tour, in seconds.

Try them in the Playground

When to use it

For the online shop of watches, jewellery, glasses, fragrances or any product sold by its photo: when moving from the catalogue grid to the product page should feel like the same object coming closer, and the precious detail (the glass, the stone, the lens) should catch the light.

On phones

The same transition with adapted sizes: the app takes almost the whole screen, the cards stay two by two and get shorter, the header takes just under half the height; the detail tiles put the icon above the name, the shipping line and the menu items step aside. You tap with a finger; the reflection that follows the pointer stays on computers only.

With reduced motion

No flights or movement: the product page fades in over the grid, already complete, with the price at its number and the reflection resting on the glass; Back fades it out and the grid returns. The Add to bag tick appears already drawn.

Pitfalls

  • With object-fit: cover the flying photo changes framing every frame and the dial slides away from the centre: working out the photo's position in pixels, with the same function for the card, the flight and the header, keeps the dial where it belongs.
  • The card zooms on hover in CSS and GSAP places the photo with a transform: on the same element GSAP's transform wipes the class's. The photo sits inside a wrapper that zooms, and GSAP only moves the photo.
  • The glass for the light goes on the computed spot, not a fixed place: the photos have their dial in different places and, as soon as the window changes size, the dial moves too. It is worked out again on resize.
  • The digit reel must not use tabular-nums (in Mona Sans it gives a slashed zero): each column takes its own digit's width, so 420 has no gaps.
  • The flying photo is removed only when the real header is already on in the same frame, otherwise the app's background shows for an instant.

Libraries

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

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

Testing

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