Skip to content
animorio
IT
Back to the library

Light veil gallery

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

The product page of a made-up pottery, Ashfold, with four slipware mugs in real photos on a grey ground. Picking a thumbnail doesn't fade the big photo: a slanted band of warm light crosses it and the new mug is uncovered right behind, starting a touch larger and settling, while the name, the price and the note roll over. Hovering the photo opens a viewfinder that follows the pointer on a soft lag and, beside it, a glass panel unfolds and shows that spot up close, with a sheen moving along. On a phone the detail is an inset in the corner of the photo.

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>
<!--
  "Light veil gallery" 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>The product gallery with a veil of light and the detail that opens to the side</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/fraunces@5.3.0/index.css">
  <link rel="stylesheet" href="style.css">
</head>
<body>
  <main class="stage" data-stage>
    <!-- the product page of a made-up pottery, Ashfold, selling four slipware mugs. Picking a thumbnail sends a band of
         warm light across the big photo and the new mug is uncovered behind it; hovering the photo opens a small
         viewfinder and, beside the photo, a glass panel that shows that spot up close -->
    <section class="shop" data-shop aria-label="Ashfold slipware collection">
      <header class="shop__head">
        <span class="brand">
          <svg class="brand__mark" viewBox="0 0 20 20" aria-hidden="true">
            <path d="M5 4.5h10l-1.2 11.2a1.6 1.6 0 0 1-1.6 1.4H7.8a1.6 1.6 0 0 1-1.6-1.4z" />
            <path d="M5.6 8.2h8.8" />
          </svg>
          <span class="brand__name">Ashfold</span>
        </span>
        <span class="crumb">Slipware collection</span>
      </header>

      <div class="shop__body">
        <ul class="thumbs" data-thumbs aria-label="Choose a mug">
          <li><button class="thumb is-on" data-thumb="0" aria-label="Marbled tankard" aria-pressed="true"><img src="marmo.webp" alt="" width="943" height="1024"></button></li>
          <li><button class="thumb" data-thumb="1" aria-label="Agate mug" aria-pressed="false"><img src="agata.webp" alt="" width="1024" height="983"></button></li>
          <li><button class="thumb" data-thumb="2" aria-label="Banded mug" aria-pressed="false"><img src="mattoni.webp" alt="" width="683" height="1024"></button></li>
          <li><button class="thumb" data-thumb="3" aria-label="Feathered cup" aria-pressed="false"><img src="felce.webp" alt="" width="1007" height="1024"></button></li>
          <span class="thumbs__mark" data-mark aria-hidden="true"></span>
        </ul>

        <figure class="photo" data-photo>
          <div class="photo__frame">
            <img class="photo__img" data-img="a" src="marmo.webp" alt="A marbled slipware tankard with a green rim, on a grey ground" width="943" height="1024">
            <img class="photo__img photo__img--next" data-img="b" src="marmo.webp" alt="" width="943" height="1024" aria-hidden="true">
            <span class="veil" data-veil aria-hidden="true"><span class="veil__core"></span></span>
            <span class="photo__grain" aria-hidden="true"></span>
            <span class="finder" data-finder aria-hidden="true">
              <span class="finder__corner finder__corner--tl"></span><span class="finder__corner finder__corner--tr"></span>
              <span class="finder__corner finder__corner--bl"></span><span class="finder__corner finder__corner--br"></span>
            </span>
          </div>
          <figcaption class="photo__hint" data-hint>
            <svg viewBox="0 0 16 16" aria-hidden="true"><circle cx="7" cy="7" r="4.6" /><path d="M10.4 10.4 14 14" /><path d="M7 5v4M5 7h4" /></svg>
            <span>Hover to see the slip up close</span>
          </figcaption>
        </figure>

        <aside class="info" data-info>
          <p class="info__kicker">Hand-thrown, Staffordshire clay</p>
          <h1 class="info__name"><span class="roll" data-name>Marbled tankard</span></h1>
          <p class="info__price"><span class="roll" data-price>$48</span><span class="info__unit">each</span></p>
          <p class="info__note"><span class="roll" data-note>Three slips swirled on the wheel: no two are alike.</span></p>
          <dl class="info__specs">
            <div><dt>Holds</dt><dd data-holds>380 ml</dd></div>
            <div><dt>Glaze</dt><dd>Lead-free</dd></div>
          </dl>
          <button class="add" type="button" data-add>
            <span class="add__label">Add to basket</span>
            <svg viewBox="0 0 16 16" aria-hidden="true"><path d="M3 8h10M9 4l4 4-4 4" /></svg>
          </button>

          <div class="detail" data-detail aria-hidden="true">
            <div class="detail__view" data-view></div>
            <span class="detail__sheen" data-sheen></span>
            <span class="detail__tag"><span data-zoomlabel>2.4x</span> detail</span>
          </div>
        </aside>
      </div>
    </section>

    <svg class="pointer" data-pointer viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.5 18.5 12 12.4 13.6 9.4 19.6z" /></svg>
    <p class="sr" aria-live="polite" data-live></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.

32 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 “Light veil gallery” 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

A product page gallery: the thumbnails on the left (below, on a phone) change the big photo with a veil of light that crosses it on a slant and uncovers the new one; over the photo a viewfinder shows the spot being looked at and the panel beside it enlarges it.

How it works

Two photos on top of each other

The big photo is two stacked imgs. The top one gets the new mug and is uncovered with a polygon clip-path: a slanted edge moving left to right, driven by a single number from 0 to 1 on power3.inOut.

The band of light follows the edge

An element a little under half the photo wide, slanted and blurred, with a warm gradient in screen mode and a brighter line in the middle, is moved every frame onto the uncovering edge: the light carries the new image behind it.

The new photo settles

The new mug starts at 1.06 and returns to 1 a little after the veil ends, the old one brightens just before it goes; at the end the bottom photo takes the new file and the top one closes again, ready for the next change.

The viewfinder and the panel

The viewfinder has the panel's proportions and measures the photo divided by the zoom; the panel uses the same photo as a background-image, with background-size and background-position computed from the same object-fit: cover measure, so it shows exactly what's in the viewfinder. The spot follows the pointer with two gsap.quickTo.

The rolling text

The name, the price and the note leave upwards and come back from below inside a line with hidden overflow, one after the other 8 hundredths of a second apart.

Values to change

NameFileDefaultWhat it changes
VEIL_TIMEscript.js1.1Seconds the band of light takes to cross the photo.
VEIL_WIDTHscript.js46Width of the band of light, in % of the photo.
VEIL_GLOWscript.js0.85How bright the band is, 0 to 1.
SETTLEscript.js1.06How much larger the new photo starts before it settles.
ZOOMscript.js2.4How many times the panel enlarges the photo.
FOLLOWscript.js0.35Seconds the viewfinder takes to catch up with the pointer.
OPEN_TIMEscript.js0.45Seconds the panel takes to unfold.
AUTO_PAUSEscript.js1.3Seconds the drawn pointer waits between two gestures.
LOOPscript.jstrueLeft alone, the drawn pointer keeps touring the mugs.

Try them in the Playground

When to use it

For the product page of a shop selling ceramics, furniture, fashion or handmade goods: wherever buyers want a close look at the surface, the texture or the stitching without opening another window, and switching between variants should feel crafted.

On phones

The same animation with adapted sizes: the photo takes almost the whole width and half the height, the thumbnails line up below and the mark follows them sideways; the detail becomes a glass inset in the top right corner of the photo, opened by holding a finger on the photo.

With reduced motion

No band of light and no settling photo: the new mug fades in, the text fades over, the thumbnail mark jumps into place. The viewfinder and the panel work the same, with no lag and no movement.

Pitfalls

  • The panel shows the photo as a background-image but the big photo uses object-fit: cover: unless the same sum is redone (scale, shown width and height, offset at the edges) the detail doesn't match the viewfinder, especially with upright photos.
  • The viewfinder must have the panel's proportions, or the detail stretches: on desktop the panel is taller than it is wide.
  • If another mug is picked while the veil is crossing, the change has to be queued and done at the end: two clip-paths at once on the same img step on each other.
  • On a phone the panel has to move inside the photo (appendChild on resize), or it stays below the name line.
  • The photos fetched from the cloud are at most 1024 pixels wide: a 2.4 zoom on a 430 pixel photo is still sharp, beyond that it starts to look soft.

Libraries

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

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

Testing

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