
The star rating
Ratings, SVG, Hover
The button that adds a case of six to the basket in an online wine shop. On the right it says the case discount; pressed, the six bottles drop into the crate one after the other while the tag counts them, then they clink, the tick draws itself on the crate and the tag says the price.
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>
<!--
"Wine case button" 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>Add a case button of a wine shop with the six bottles that drop into the crate</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 button that adds a case of six in a wine shop: pressed, the six bottles drop into the crate one after
the other while the tag counts them, then the crate settles, a tick draws itself and the tag says the price -->
<button class="wn" type="button" data-wn>
<span class="wn__body" aria-hidden="true"><span class="wn__wash" data-wash></span><span class="wn__light"></span></span>
<span class="wn__edge" aria-hidden="true"></span>
<span class="seat" data-seat aria-hidden="true">
<svg viewBox="0 0 24 24">
<g data-bottles></g>
<g data-crate>
<path class="seat__crate" d="M3.600 12.200h16.800v6.300a1.300 1.300 0 0 1-1.300 1.300H4.900a1.300 1.300 0 0 1-1.300-1.300Z"></path>
<path class="seat__slat" d="M3.600 15.900h16.800"></path>
<path class="seat__tick" data-tick pathLength="1" d="M9 15.800 11.200 17.900 15.300 13.500"></path>
</g>
</svg>
</span>
<span class="label">
<span class="label__main"><span data-word>Add a case</span></span>
<span class="label__sub"><span data-sub>Six bottles, 10% off</span></span>
</span>
<span class="tag" aria-hidden="true"><span data-left></span></span>
</button>
<p class="sr" data-live aria-live="polite"></p>
<svg class="ghost" data-ghost viewBox="0 0 24 24" aria-hidden="true"><path d="M5 3.2 19.2 11l-6.3 1.6-3.3 5.9Z"></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.
16 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 “Wine case button” from Animorio and fit it into my siteThe bottles are six SVG paths made by the script (body, shoulder and neck in one path), drawn before the crate: falling, they vanish behind its edge with no clipping needed.
Each bottle drops with power2.in in 0.26 seconds; at the instant it lands it bounces by 0.9 units, the crate dips by 0.7 and comes back with back.out(3), and the number in the tag ticks.
At the end the six bottles swing by four degrees on their base with a stagger from the centre, and the tick draws itself in 0.36 seconds on the front of the crate.
| Name | File | Default | What it changes |
|---|---|---|---|
WINE | script.js | "Colle Brina Rosso 2021" | The wine (made-up name). |
PRICE | script.js | 14 | The price of one bottle, in euros (made up). |
OFF | script.js | 10 | The case discount, in percent. |
FALL | script.js | 0.2 | How many seconds between one bottle and the next. |
ACCENT | script.js | #b02a4a | The colour of the wine. |
OK | script.js | #17b877 | The colour once the case is added. |
HOLD | script.js | 2.6 | Alone: how many seconds the confirmation stays before going back. |
LOOP | script.js | true | Left alone, a pointer tries it by itself. |
On a wine’s page of an online wine shop or winery, in a beer or olive oil shop, wherever things are sold in multiples with a discount (the case of six, the pack of twelve).
The same pill, at most as wide as the screen minus the margins; there is no hover, the tap does the same job.
The bottles do not fall: they appear already in the crate, the tag says six, the texts change without rolling and the tick appears.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 5.8 KB; the libraries: GSAP 28 KB.
Tested on 16 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.