
The star rating
Ratings, SVG, Hover
The Add wine pairing button of a restaurant’s tasting menu, made of smoked glass on a warm dark background: a thin layer of red wine rests on the button’s floor and, on hover, leans towards the pointer like a real spirit level. Pressed, the glass gives and the wine sloshes; then the button pours the five glasses of the pairing, one per course: a thin stream falls, the level rises with a ripple and changes colour with each wine, from the golden sparkling Franciacorta to the ruby Recioto, while the names of the wine and the course roll by. At the end a reflection crosses the glass and the goblet becomes a check: Pairing added, 5 glasses.
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 pairing 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>The Add wine pairing button that fills with wine</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 Add wine pairing button of a tasting-menu restaurant, made of smoked glass with a little wine resting on
its floor. On hover the wine leans towards the pointer like a real level and a soft light follows it; pressed,
the glass gives and the wine sloshes. Then the button pours the five glasses of the pairing, course by course:
the level climbs in five pours, each with its own wine colour, a thin stream and a ripple, the name of the wine
and of its course roll by. At the end the wine settles deep ruby, a reflection crosses the glass and the
button says Pairing added with a check and 5 glasses. -->
<div class="wp" data-wrap>
<span class="wp__spill" aria-hidden="true"></span>
<button class="wp__btn" type="button" data-btn aria-label="Add wine pairing, 5 glasses, 48 euros">
<span class="wp__glass" data-glass>
<span class="wp__base" aria-hidden="true"></span>
<svg class="wp__wine" data-wine aria-hidden="true">
<defs>
<clipPath id="wp-clip"><rect data-clip x="0" y="0" width="300" height="60" rx="30"/></clipPath>
<linearGradient id="wp-liq" x1="0" y1="0" x2="0" y2="1">
<stop offset="0" data-stop-a stop-color="#7a1a34" stop-opacity="1"/>
<stop offset="0.16" data-stop-m stop-color="#7a1a34" stop-opacity="0.96"/>
<stop offset="1" data-stop-b stop-color="#3a0814" stop-opacity="1"/>
</linearGradient>
</defs>
<g clip-path="url(#wp-clip)" data-liq-g>
<path class="wp__stream" data-stream/>
<path class="wp__liq" data-liq fill="url(#wp-liq)"/>
<g class="wp__fizz" data-fizz></g>
<path class="wp__surf" data-surf/>
</g>
</svg>
<span class="wp__frost" aria-hidden="true"></span>
<span class="wp__shine" data-shine aria-hidden="true"></span>
<span class="wp__sweep" aria-hidden="true"><span class="wp__sweep-band" data-sweep></span></span>
<span class="wp__row">
<span class="wp__icon" aria-hidden="true">
<svg viewBox="0 0 24 24">
<defs>
<clipPath id="wp-bowl"><path d="M7.2 3.4h9.6c.2 4.9-1.5 8.1-4.8 8.5-3.3-.4-5-3.6-4.8-8.5z"/></clipPath>
</defs>
<g data-goblet>
<rect class="wp__bowl-wine" data-bowl clip-path="url(#wp-bowl)" x="6" y="3" width="12" height="10"/>
<path class="wp__goblet" d="M7.2 3.4h9.6c.2 4.9-1.5 8.1-4.8 8.5-3.3-.4-5-3.6-4.8-8.5zM12 11.9v7.9M8.6 20.2h6.8"/>
</g>
<path class="wp__check" data-check pathLength="1" d="M5.6 12.6l4.1 4.1 8.6-9.2"/>
</svg>
</span>
<span class="wp__labels" aria-hidden="true">
<span class="wp__label" data-label>Add wine pairing</span>
<span class="wp__label wp__label--busy" data-label>Franciacorta</span>
<span class="wp__label" data-label>Pairing added</span>
</span>
<span class="wp__chip" aria-hidden="true">
<span class="wp__chip-face" data-chip>+€48</span>
<span class="wp__chip-face" data-chip>Raw bar</span>
<span class="wp__chip-face" data-chip>5 glasses</span>
</span>
</span>
</span>
</button>
</div>
<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.
29 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 pairing button” from Animorio and fit it into my siteThe wine is a handful of numbers: the level (as a share of the height), how far it leans at the edge and its speed, the height and phase of a ripple, the colour in three channels. GSAP moves the level and the colour; the ticker integrates the rest.
Every frame the surface is a polyline of 28 points: the level, plus the lean times the distance from the centre, plus a sine ripple that travels and decays exponentially. The same path, closed at the bottom, is the body of the wine with a vertical gradient (lighter under the surface), and on its own it is the one-pixel highlight. Everything is clipped by a clipPath as tall and round as the button; when nothing changes, nothing is redrawn.
On hover the lean target follows the pointer (quickTo); the lean chases it with a hand-integrated spring in two steps per frame (stiffness 120, damping 7), so it goes past and comes back. Press, pours and draining give it a kick of speed and raise the ripple.
Each course is a piece of timeline: the stream (a path from the top edge to the surface, in the wine’s colour), the level rising with power2.out, the colour turning to the next wine, the glass breathing by a pixel. In the first wine bubbles rise: tiny circles born on the floor that fade at the surface.
The wine and the course change inside the same line: the old word rises and fades, the text changes, the new one comes from below with a small back.out. The light on the table and the button’s coloured shadow read the wine’s colour from a CSS variable.
| Name | File | Default | What it changes |
|---|---|---|---|
LABEL_REST | script.js | Add wine pairing | The words at rest. |
LABEL_DONE | script.js | Pairing added | The words at the end. |
PRICE | script.js | +€48 | The capsule at rest: what the pairing costs. |
GLASSES | script.js | 5 glasses | The capsule at the end. |
POUR | script.js | 0.62 | Seconds for each of the five pours. |
FULL | script.js | 0.72 | How full the button gets at the end, as a share of its height. |
REST_LEVEL | script.js | 0.13 | How much wine rests on the button’s floor. |
TILT | script.js | 7 | How far the wine leans towards the pointer, in pixels at the edge. |
SLOSH | script.js | 1 | How lively the wine is: 0.4 thick and calm, 2 very sloshy. |
FIZZ | script.js | 12 | How many bubbles rise in the sparkling wine. |
HOLD | script.js | 1.7 | Seconds Pairing added stays before going back. |
AUTO | script.js | true | Goes round by itself until someone touches it. |
For an add-on to a restaurant, wine bar or winery order or booking: the wine pairing with the tasting menu, a bottle for the table, coffee after dinner. The button tells what is being added while it adds it, and the price stays in sight.
On the phone the button is at most 84% of the screen wide and the surface redraws to its size; there is no hover, so the light turns on under the finger at the touch and the wine sloshes on the press; pours and ending are the same.
Nothing moves: the wine stays flat and never leans, no stream and no bubbles; at each course the wine dims, takes its new level and colour and fades back, the words swap in place and the check fades in.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 9.5 KB; the libraries: GSAP 28 KB.
Tested on 2 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.