
Stacking certificates
Hover, Images
The real photo of a living room in the shop of an invented furniture brand, to buy piece by piece: passing over the armchair, the pendant lamp or the coffee table, four thin corners frame it with a small bounce, the rest of the photo sinks under a warm veil and the photo moves slightly closer to the piece. Beside it its card opens, with a thumbnail cropped from the same photo, the material, the price and Add to bag.
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>
<!--
"Shop the look photo" 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 shop-the-look photo that frames each piece on hover</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>
<main class="palco">
<!-- the room photo of a furniture shop: passing over a piece frames it, dims the rest and opens its card -->
<section class="vetrina" data-vetrina>
<div class="quadro">
<figure class="foto" data-foto>
<div class="foto__lente" data-lente>
<img class="scena" src="soggiorno.webp" width="853" height="640" decoding="async" alt="A bright living room with a taupe tufted armchair, a drum pendant lamp and a white lacquer coffee table on a grey rug">
<!-- the warm glow of the pendant, lit when the lamp is framed -->
<svg class="luce" viewBox="0 0 800 600" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<defs>
<radialGradient id="bagliore" cx=".5" cy=".42" r=".5"><stop offset="0" stop-color="#ffcf8a" stop-opacity=".85"/><stop offset=".55" stop-color="#ffcf8a" stop-opacity=".3"/><stop offset="1" stop-color="#ffcf8a" stop-opacity="0"/></radialGradient>
</defs>
<ellipse data-luce cx="481" cy="118" rx="170" ry="150" fill="url(#bagliore)" opacity="0"/>
</svg>
<!-- the veil over the rest of the photo, with a hole where the piece is -->
<svg class="velo" viewBox="0 0 800 600" preserveAspectRatio="xMidYMid slice" aria-hidden="true">
<defs>
<mask id="buco" maskUnits="userSpaceOnUse" x="0" y="0" width="800" height="600">
<rect width="800" height="600" fill="#fff"/>
<rect data-foro x="-20" y="-20" width="840" height="640" rx="18" fill="#000"/>
</mask>
</defs>
<rect class="velo__ombra" data-ombra width="800" height="600" mask="url(#buco)"/>
</svg>
<div class="cornice" data-cornice aria-hidden="true"><i></i><i></i><i></i><i></i></div>
<button class="zona" data-zona="0" aria-label="Slab coffee table"></button>
<button class="zona" data-zona="1" aria-label="Arlo armchair"></button>
<button class="zona" data-zona="2" aria-label="Halo pendant lamp"></button>
</div>
<div class="grana" aria-hidden="true"></div>
</figure>
<aside class="prodotto" data-prodotto aria-live="polite">
<div class="prodotto__riga">
<div class="prodotto__foto"><svg data-miniatura viewBox="0 0 100 100" preserveAspectRatio="xMidYMid slice" aria-hidden="true"><image href="soggiorno.webp" width="800" height="600" preserveAspectRatio="none"/></svg></div>
<div class="prodotto__testi">
<p class="prodotto__nome" data-nome></p>
<p class="prodotto__dett"><i class="campione" data-campione></i><span data-dett></span></p>
<p class="prodotto__prezzo" data-prezzo></p>
</div>
</div>
<button class="aggiungi" data-aggiungi>
<span class="aggiungi__testo" data-aggiungi-testo>Add to bag</span>
<span class="aggiungi__fatto" data-aggiungi-fatto><svg viewBox="0 0 16 16" aria-hidden="true"><path data-spunta d="M3.5 8.4 6.6 11.4 12.6 4.8"/></svg>Added</span>
</button>
</aside>
</div>
<div class="piede">
<p class="piede__titolo"><b>Oakline</b> Living room, autumn edit</p>
<p class="borsa" aria-label="Bag"><span>Bag</span><span class="borsa__cifra"><span data-cifre><span>0</span><span>1</span><span>2</span><span>3</span></span></span></p>
</div>
<svg class="puntatore" data-puntatore viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2v15.4l4.1-3.9 2.7 6 2.6-1.2-2.7-5.9h5.6z"/></svg>
</section>
</main>
<script src="https://cdn.jsdelivr.net/npm/gsap@3.15.0/dist/gsap.min.js"></script>
<script src="script.js"></script>
</body>
</html>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.
23 values to change
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 “Shop the look photo” from Animorio and fit it into my siteThe photo is a webp cropped to 4/3 in a frame with aspect-ratio 4/3, and every piece has its rectangle measured on the photo in units of an 800 by 600 plane: the hit areas, the frame and the veil are placed in percent and stay on the piece at any size, on resize and on a phone too.
Over the photo a second SVG with the same viewBox: a dark rectangle with a mask, and in the mask a black round-cornered rectangle that is the hole. GSAP animates a single object (x, y, width, height, darkness) and every frame moves the hole, the frame and the veil’s opacity.
The frame is four corners made of two borders; a CSS variable --stacco pushes them out. On every new piece --stacco goes from 9 px to 0 with back.out, so the corners overshoot by a pixel and come back.
Photo, veil and frame sit in one container that scales by AVVICINAMENTO from the centre; xPercent and yPercent shift it just enough for the piece’s centre to stay still, so the zoom goes towards the piece.
The card’s thumbnail is an SVG holding the same photo as an 800 by 600 <image>: changing its viewBox to the piece’s crop is enough. The old card leaves before the new one comes in, and Add to bag turns into Added the same way, one first and then the other.
| Name | File | Default | What it changes |
|---|---|---|---|
VELO | script.js | 0.4 | How dark the rest of the photo gets around the piece. |
AVVICINAMENTO | script.js | 1.03 | How much the photo moves closer to the framed piece. |
MARGINE | script.js | 16 | The room between the piece and its frame, in photo units. |
DURATA | script.js | 0.75 | The seconds the frame takes to move from one piece to another. |
RIMBALZO | script.js | 3 | How far the frame’s corners overshoot before they stop. |
SOSTA | script.js | 1.9 | The seconds on each piece in the drawn pointer’s round. |
For the room shots of a furniture, fashion or homeware shop, when one photo shows several products together and each must be buyable without leaving the photo; also for a lookbook or a magazine with the products marked.
The photo takes the width of the box and stays 4/3; a tap on a piece frames it and opens its card, smaller but with the same lines; a tap on another piece moves the frame there.
Frame and veil fade in already in place, without sliding or bouncing, the photo does not move closer and the card fades in and out; the drawn pointer is hidden.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 7.2 KB; the libraries: GSAP 28 KB.
Tested on 7 November 2026
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.
Support Animorio
Animorio stays free thanks to the people who support it. If you like, buy us a coffee: it helps us make the next animations.
You asked for
We made it for you: it’s in the library, with the preview, the Playground and the code to copy.
An animation you can’t find, or a site to take apart in the journal: tell us which. We pick the next ones from here.
With your account’s email and password.
or with your email
You’re signed in as .
With your account, you can download the zip of every animation and every pack, for free.