
Stacking certificates
Hover, Images
The product page of an eau de parfum from an invented house, dark and elegant: on the left a real photo of an amber perfume bottle kept in the half dark, on the right the name, the notes, the price and Add to bag. A light follows the pointer on a spring and goes through the glass: it lifts the photo where it falls, lights up the amber inside the bottle, slides a glint along the glass, warms the air behind and throws a caustic on the table on the other side. As it goes down from the cap to the base, the top, heart and base notes light up one after the other.
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>
<!--
"Perfume glass 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>The perfume page with the light that crosses the glass</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/full.css">
<link rel="stylesheet" href="style.css">
</head>
<body>
<main class="stage" data-stage>
<!-- the product page of an invented perfume house. On the left a real photograph of an amber perfume bottle, kept
in the dark; a light follows the pointer and goes through the glass: it lifts the photo where it falls, makes
the amber glow inside the bottle, draws a glint on the glass, warms the air behind and throws a caustic on the
table. On the right the notes light up one after the other as the light passes from the cap to the base -->
<article class="product" data-product>
<figure class="photo" data-photo>
<div class="shot" data-shot>
<img class="shot__img" src="profumo.webp" width="631" height="1024" alt="An amber eau de parfum in a cut glass bottle with a clear cap, on a wooden table, two more bottles out of focus behind it" decoding="async">
<img class="shot__lit" src="profumo.webp" width="631" height="1024" alt="" aria-hidden="true" decoding="async">
<i class="shot__halo" data-halo aria-hidden="true"></i>
<span class="shot__caustic" data-caustic aria-hidden="true"><i class="shot__caustic-light" data-caustic-light></i></span>
<div class="shot__glass" data-glass aria-hidden="true">
<img class="shot__amber" src="profumo.webp" width="631" height="1024" alt="" decoding="async">
<span class="shot__streak" data-streak><i class="shot__streak-light"></i></span>
<span class="shot__streak shot__streak--back" data-streak-back><i class="shot__streak-light"></i></span>
</div>
</div>
<i class="photo__shade" aria-hidden="true"></i>
<i class="photo__seam" aria-hidden="true"></i>
<figcaption class="photo__tag">Eau de Parfum</figcaption>
</figure>
<section class="info" aria-label="Ambre Nocturne">
<p class="info__house">Maison Ardesia</p>
<h1 class="info__name">Ambre <em>Nocturne</em></h1>
<p class="info__kind"><span>Eau de Parfum</span><i class="info__sep" aria-hidden="true"></i><span>50 ml</span></p>
<p class="info__line">A warm amber lit from within: resin, iris and a trace of smoke.</p>
<ul class="notes" data-notes>
<li class="note" data-note>
<span class="note__tier">Top</span>
<span class="note__names">Bergamot, pink pepper</span>
<i class="note__rule" aria-hidden="true"><i class="note__fill" data-fill></i></i>
</li>
<li class="note" data-note>
<span class="note__tier">Heart</span>
<span class="note__names">Orris, orange blossom</span>
<i class="note__rule" aria-hidden="true"><i class="note__fill" data-fill></i></i>
</li>
<li class="note" data-note>
<span class="note__tier">Base</span>
<span class="note__names">Amber, sandalwood, tonka</span>
<i class="note__rule" aria-hidden="true"><i class="note__fill" data-fill></i></i>
</li>
</ul>
<div class="buy">
<p class="buy__price"><span class="buy__amount">€148</span><span class="buy__note">Free delivery, 2 ml sample included</span></p>
<button class="bag" type="button" data-bag>
<span class="bag__face" data-bag-face>
<span class="bag__words" data-bag-words>Add to bag</span>
<svg class="bag__icon" viewBox="0 0 18 18" aria-hidden="true">
<path class="bag__shape" data-bag-shape d="M4.2 6.4h9.6l-.7 8.4H4.9zM6.6 6.4V5.2a2.4 2.4 0 0 1 4.8 0v1.2"/>
<path class="bag__check" data-bag-check pathLength="1" d="M4.6 9.4l2.9 2.9 5.9-6.3"/>
</svg>
</span>
</button>
</div>
</section>
</article>
<!-- the pointer that walks on its own until a real one arrives -->
<svg class="pointer" data-pointer viewBox="0 0 20 24" aria-hidden="true">
<path d="M3 2.2v17.4l4.6-4.3 2.9 6.6 2.9-1.3-2.9-6.4h6.3z"/>
</svg>
<i class="grain" data-grain aria-hidden="true"></i>
<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>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
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 “Perfume glass page” from Animorio and fit it into my siteThe photo is not cropped with object-fit on the column: it sits in .shot, a box with its own proportions (631 by 1024) that the script scales just enough to cover the column, centred on the bottle and without leaving gaps. So every layer over the photo is written in the photo's pixels, and the outline of the bottle lands on the glass at every size, even when the window changes.
At the bottom the photo in the half dark (brightness 0.38). Over it the same photo lit, with a radial-gradient mask centred on --lx and --ly: that is the pool of light. Over that, inside the glass layer, a third copy brighter and more saturated, with a wider mask: the amber lighting up as the light goes through it. The script changes just three CSS variables per frame.
The bottle is a polygon of 32 points written in the photo's pixels, turned into percentages for clip-path: polygon(). It clips the glass layer, with the amber and the glints. The same outline, joined to the photo's rectangle in an evenodd polygon, does the opposite: it leaves the warm glow everywhere but on the glass, so it seems to be behind.
The script measures where the light is against the bottle: across, how far to the side of the axis, and along, how far down from the cap to the base. The white glint moves by 0.42 times across, as on a curved surface, and the warm one on the other side; the caustic goes on the table on the opposite side, skewed and longer when the light is low. Every note has its band of along: when the light passes through it the note lights up and stays lit for HOLD seconds.
The light chases the pointer, real or drawn, on a spring integrated by hand in two steps per frame (stiffness 95, damping 13): it arrives a little late, passes the mark and settles. The amount of light has its own spring too and fades slowly when the pointer leaves the photo. The drawn pointer is a GSAP timeline that stops at the first real pointer and starts again three seconds later.
| Name | File | Default | What it changes |
|---|---|---|---|
LIGHT_SIZE | script.js | 0.5 | The radius of the pool of light, as a share of the photo's width. |
DARKNESS | script.js | 0.38 | How bright the photo is where the light does not reach (1 = not dimmed). |
AMBER | script.js | 0.9 | How much the perfume glows when the light goes through it. |
GLINT | script.js | 0.85 | How bright the glint on the glass is. |
CAUSTIC | script.js | 0.75 | How bright the caustic on the table is. |
HOLD | script.js | 2.4 | How many seconds a note stays lit after the light has passed. |
STIFFNESS | script.js | 95 | The spring pulling the light to the pointer: higher is quicker. |
DAMPING | script.js | 13 | Lower lets the light pass the mark and come back. |
SPEED | script.js | 1 | 2 = the walk on its own twice as fast, 0.5 = half. |
LOOP | script.js | true | Repeats the light's walk down the bottle. |
For the product page of a perfumery, a cosmetics brand, candles, wines or spirits: anything in glass with a colour inside, when the photo has to feel alive and make people want to pick it up.
The same animation with adapted sizes: the two columns stay side by side and narrow, the line describing the perfume goes, the notes put their label above the names and the button moves under the price. With a finger the light goes where you touch and follows as you drag.
The light does not move: it stays still halfway down the bottle and fades in and out; the notes light up with a fade and the button changes its words and icon with a fade, without the drawn pointer.
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 11 KB; the libraries: GSAP 28 KB.
Tested on 5 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.