
The magnifying dock
Menus, Hover, Images
The card of a skincare product: a serum in its amber dropper bottle, in a real photo on a warm tile. Three sizes to choose, 15, 30 and 50 ml: the pill slides, the bottle grows or shrinks on a spring, the price counts to the new one, the price per millilitre rolls below and “Best value” appears on the size that pays off. “Add to bag” confirms with the chosen size.
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>
<!--
"Serum product card" 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>Serum product card</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="stage">
<!-- the product card of a skincare shop: the size picked changes the price, the price per millilitre and
how large the bottle looks, and Add to bag confirms with the size -->
<section class="sr" data-sr aria-labelledby="sr-title">
<div class="sr__shot">
<span class="sr__bottle" data-bottle><img src="siero.webp" alt="Amber glass dropper bottle with a plain paper label" width="840" height="840"></span>
<i class="sr__grain" aria-hidden="true"></i>
<em class="sr__chip">Niacinamide 10%</em>
<em class="sr__best" data-best aria-hidden="true">Best value</em>
</div>
<div class="sr__row">
<span class="sr__name"><b id="sr-title">Dew Drop Serum</b><span>Brightening, for every day</span></span>
<span class="sr__price" aria-live="polite"><b data-price>€29</b><span class="sr__perroll"><span data-per>€0.97 per ml</span></span></span>
</div>
<div class="sr__sizes" role="radiogroup" aria-label="Size" data-sizes>
<i class="sr__pick" data-pick aria-hidden="true"></i>
<button class="sr__size" type="button" role="radio" aria-checked="false" tabindex="-1" data-size data-ml="15" data-eur="18">15 ml</button>
<button class="sr__size" type="button" role="radio" aria-checked="true" data-size data-ml="30" data-eur="29">30 ml</button>
<button class="sr__size" type="button" role="radio" aria-checked="false" tabindex="-1" data-size data-ml="50" data-eur="42">50 ml</button>
</div>
<button class="sr__go" type="button" data-go>
<svg viewBox="0 0 18 18" aria-hidden="true"><path class="bag" d="M4 6.500h10l-.800 8.500H4.800ZM6.500 6.500V5a2.500 2.500 0 0 1 5 0v1.500"></path><path class="ck" pathLength="1" d="m5 9.500 3 3 5.500-6"></path></svg>
<span class="sr__gotext"><span data-golabel>Add to bag</span></span>
</button>
</section>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.200 19.200 11l-6.300 1.600-3.300 5.900Z"></path></svg>
</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
Works with Claude, Claude Code, ChatGPT, Cursor, VS Code, Windsurf, Codex, Gemini CLI
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 “Serum product card” from Animorio and fit it into my siteEach size carries its millilitres and its price in two attributes. On choosing it, a function works out the price, the price per millilitre, how big the bottle must be and whether it is the one that pays off.
The photo has a white ground: with mix-blend-mode multiply on the cream tile the white disappears and only the bottle stays, as if it had been shot there.
The photo’s wrapper scales between SMALL and 1 with its origin low, at the bottle’s base, and a spring GROW seconds long: it grows from the ground, not from the centre.
A number taken to the new value by a tween and written rounded on every frame; the price per millilitre rolls in a one-line window.
Three buttons with the keyboard arrows; the pill moves in percent, with no measuring.
| Name | File | Default | What it changes |
|---|---|---|---|
ACCENT | script.js | #b5622a | The colour of the Best value tag and of the button after adding. |
SMALL | script.js | 0.82 | How big the bottle is with the smallest size, compared with the largest. |
GROW | script.js | 0.9 | How long the bottle takes to grow or shrink on a size change. |
COUNT | script.js | 0.5 | How long the counting price lasts. |
SPRING | script.js | 1 | How much the bottle and the size pill bounce: 0.3 = a little, 2 = a lot. |
LOOP | script.js | true | Left alone, the demo’s pointer tries the three sizes and adds to the bag. |
In the shop of a brand of skincare, perfume, supplements, tea or detergents: wherever the same product is sold in several sizes and it pays to show at once what it costs per millilitre or gram.
The same card, 312 pixels wide at most: the photo tile is 150 pixels tall or a third of the screen if it is short, the sizes stay in one row 32 pixels tall and the button 46.
No springs and no counting prices: on choosing a size the bottle is already the right size, price, price per millilitre and tag change in one step; the button shows the tick with no hop. The demo does not move by itself.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.6 KB; the libraries: GSAP 28 KB.
Tested on 24 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.
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.