Skip to content
animorio
IT
Back to the library

Product page

Images, HoverGSAP, CSS onlyMediumCompressed weight: Demo 9.8 KBGSAP 28 KBFreeDownload the zip

The inside page of one product in a made-up leather shop, Ostler Leather Co.: the big photo of the satchel with four thumbnails, the name, the price, two lines of description, the laptop sizes and the Add to bag button, off until a size is chosen. The chosen thumbnail grows out of its place into the big photo, a dark pill slides under the chosen size, the price rolls digit by digit, the button fills with ink and a warm light runs through it; the sold-out size is crossed out and offers Notify me. Real photos. Minimal premium style.

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>
<!--
  "Product page" 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>Field Satchel, Ostler Leather Co.</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 product page of a made-up leather maker, Ostler Leather Co.: the big photo with its thumbnails, the name, the
       price, two lines of description, the laptop sizes and the Add to bag button, off until a size is chosen. A
       thumbnail grows into the big photo; the chosen size gets a pill that slides; the price rolls to the price of that
       size; the button fills with ink and a light runs through it; the bag in the corner counts what you add -->
  <main class="pagina">
    <div class="palco" data-palco>
      <div class="miniature" role="group" aria-label="Photos of the satchel" data-miniature>
        <span class="anello" data-anello aria-hidden="true"></span>
        <button class="mini" type="button" data-mini data-vista="Front" aria-label="Front" aria-pressed="true">
          <img src="fronte.webp" alt="" width="1024" height="610" style="object-position: 46% 50%" draggable="false">
        </button>
        <button class="mini" type="button" data-mini data-vista="Inside" aria-label="Inside" aria-pressed="false">
          <img src="interno.webp" alt="" width="960" height="640" style="object-position: 30% 40%" draggable="false">
        </button>
        <button class="mini" type="button" data-mini data-vista="On the shoulder" aria-label="On the shoulder" aria-pressed="false">
          <img src="a-spalla.webp" alt="" width="1024" height="715" style="object-position: 44% 72%" draggable="false">
        </button>
        <button class="mini" type="button" data-mini data-vista="By the water" aria-label="By the water" aria-pressed="false">
          <img src="sul-molo.webp" alt="" width="960" height="640" style="object-position: 66% 64%" draggable="false">
        </button>
      </div>

      <figure class="quadro" data-quadro>
        <span class="quadro__zoom" data-zoom>
          <img class="quadro__foto" data-foto src="fronte.webp" alt="The Field Satchel in tan bridle leather, standing on a granite step" width="1024" height="610" style="object-position: 46% 50%" draggable="false">
        </span>
        <span class="quadro__luce" aria-hidden="true"></span>
        <figcaption class="vista">
          <span class="vista__finestra"><span class="vista__riga" data-vista-riga>Front</span></span>
        </figcaption>
      </figure>

      <section class="info" aria-label="Field Satchel">
        <header class="info__testa">
          <p class="marca">Ostler Leather Co.</p>
          <p class="borsa" aria-live="polite"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M4.5 7h11l-.9 10H5.4z"/><path d="M7.5 7V5.6a2.5 2.5 0 0 1 5 0V7"/></svg><span>Bag</span><span class="borsa__conta"><span class="borsa__riga" data-borsa><span>0</span><span>1</span><span>2</span><span>3</span><span>4</span><span>5</span><span>6</span><span>7</span><span>8</span><span>9</span></span></span></p>
        </header>

        <h1 class="nome">Field Satchel</h1>
        <p class="colore">Tan bridle leather</p>

        <p class="prezzo" aria-live="polite">
          <span class="prezzo__da" data-da>from</span>
          <span class="prezzo__cifre" data-prezzo aria-hidden="true">$<span class="cifra"><span class="striscia" data-striscia>0 1 2 3 4 5 6 7 8 9</span></span><span class="cifra"><span class="striscia" data-striscia>0 1 2 3 4 5 6 7 8 9</span></span><span class="cifra"><span class="striscia" data-striscia>0 1 2 3 4 5 6 7 8 9</span></span></span>
          <span class="solo-lettore" data-letto>from $228</span>
        </p>

        <p class="descrizione">Vegetable-tanned bridle leather, hand-stitched in Leeds. Takes a laptop, a notebook and lunch, and darkens the more it is carried.</p>

        <div class="taglie">
          <div class="taglie__testa">
            <p class="etichetta">Laptop size</p>
            <a class="guida" href="#" data-guida>Size guide</a>
          </div>
          <div class="pillole" role="radiogroup" aria-label="Laptop size" data-pillole>
            <span class="scelta" data-scelta aria-hidden="true"></span>
            <button class="pillola-taglia" type="button" role="radio" aria-checked="false" data-taglia="13" data-prezzo="228" data-resta="6">13″</button>
            <button class="pillola-taglia" type="button" role="radio" aria-checked="false" data-taglia="14" data-prezzo="238" data-resta="2">14″</button>
            <button class="pillola-taglia" type="button" role="radio" aria-checked="false" data-taglia="15" data-prezzo="248" data-resta="9">15″</button>
            <button class="pillola-taglia esaurita" type="button" role="radio" aria-checked="false" aria-disabled="true" data-taglia="16" data-prezzo="258" data-resta="0">16″<svg class="barra" viewBox="0 0 40 20" preserveAspectRatio="none" aria-hidden="true"><line x1="4" y1="17" x2="36" y2="3" pathLength="1"/></svg></button>
          </div>
          <div class="nota" aria-live="polite">
            <div class="nota__riga" data-nota><span>Ships in two days. Free returns.</span></div>
          </div>
        </div>

        <button class="compra" type="button" aria-disabled="true" data-compra>
          <span class="compra__fondo" data-fondo aria-hidden="true"></span>
          <span class="compra__luce" data-luce aria-hidden="true"></span>
          <span class="compra__finestra">
            <span class="compra__riga" data-etichetta>
              <span>Select a size</span>
              <span>Add to bag</span>
              <span><svg viewBox="0 0 20 20" aria-hidden="true"><path data-spunta d="M4.5 10.4l3.6 3.6 7.4-7.6" pathLength="1"/></svg>Added to bag</span>
            </span>
          </span>
        </button>
      </section>
    </div>
  </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.

49 values to change

Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI

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 “Product page” 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, the page of the Field Satchel by Ostler Leather Co., a made-up leather maker. On the left four thumbnails in a column (the satchel from the front, open with a tie and a notebook inside, on the shoulder by the water, resting on a wooden crate by the lake) and a thin ring around the chosen one; in the middle the big photo, with a small glass label at the bottom naming the view. On the right the maker, the bag at the top with how many you have added, the name Field Satchel, the colour, the price «from $228», two lines of description, the four laptop sizes (13″, 14″, 15″ and 16″, sold out, dashed and crossed out), a note and the button, grey and off with Select a size. Choosing a thumbnail doesn’t swap the photo at once: the thumbnail leaves its place and grows until it covers the big photo, changing corners and crop on the way, while the old photo sinks back a little and darkens, the ring slides to the new thumbnail and the label rolls to the name of the view; when it arrives, the photo settles with a pixel of bounce. With the mouse over it the photo comes closer and follows the pointer. Choosing a size lays a dark pill under it; changing size stretches the pill from the old size to the new one and then lets go of the old one with a small bounce. The price rolls digit by digit to the price of that size, «from» goes, and the note says how many are left (in cognac orange when few). The button fills with ink from the left, a warm light runs through it and the label rolls to Add to bag. The sold-out size shakes and the note offers Notify me. Pressed, the button sinks, the label rolls to Added to bag with a tick drawing itself and the bag at the top counts one more with a small hop. The keyboard arrows change photo and size. Left alone, the page runs through by itself.

How it works

The thumbnail that grows

On click the thumbnail and the big photo are measured with getBoundingClientRect, relative to the stage. A copy of the thumbnail goes into an absolute box that starts exactly over the thumbnail (radius 8) and GSAP animates its left, top, width and height to the photo’s box (radius 14) in GROW seconds with expo.inOut; inside, the image with object-fit: cover changes its crop by itself as the box changes shape, and goes from 1.12 to 1. The old photo goes to SINK and darkens; at the end the big photo takes the new source and the copy goes.

The pill that stretches

The dark pill is a single element behind the size buttons. To go from one size to another it first stretches to cover both (x and width, power2.in), then lets go of the old one and settles on the new one with back.out: it looks like a drop sliding. The sizes are read with offsetLeft and offsetWidth and measured again on resize.

The price and the button

The price is three columns of digits from 0 to 9: each rises with its own yPercent, the right digit first. The button has an ink ground in scaleX from 0 to 1 with its origin on the left and a slanted band of light running through it once; the label is a column of three lines (Select a size, Add to bag, Added to bag) sliding in its window.

Values to change

NameFileDefaultWhat it changes
GROWscript.js0.75Seconds a thumbnail takes to grow into the big photo.
SINKscript.js0.96How far the old photo sinks back while the new one grows (1 = not at all).
SLIDEscript.js0.5Seconds the size pill takes to slide to the new size.
FILLscript.js0.55Seconds the button takes to fill with ink.
LIGHTscript.js0.9Seconds the light takes to run through the button.
ROLLscript.js0.45Seconds the labels and the price take to roll.
PRESSscript.js0.97How much the button sinks under the finger.
ZOOMscript.js1.06How much the photo comes closer under the pointer.
AUTOscript.js1.2Seconds before the page runs through by itself, when nobody touches it.

Try them in the Playground

When to use it

For a product page in an online shop: bags, clothes, shoes, objects with sizes. It works when there are a few good photos of the same object and one choice to make before buying.

On phones

The same animations. The photo sits at the top, as wide as the screen and at most 40% of the height, with the thumbnails in a row in its bottom right corner; below, the name with the price beside it, the sizes and the button. Description and colour hide when the screen is short.

With reduced motion

No flight and no bounces: the photo crossfades, the pill appears in place, the price and labels change at once, the button is already full.

Pitfalls

  • The flying copy must be measured against the stage, not the page: with the viewer’s safety net shrinking the demo, getBoundingClientRect rectangles are already scaled, and left and top are computed by subtracting the stage’s rectangle.
  • The button’s ground empties to the right: before filling it again the origin goes back to the left, or the second time it starts from the wrong side.
  • A second click during the flight is ignored, or two copies chase each other and the final photo is the wrong one.

Libraries

GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.

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

Testing

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