Skip to content
animorio
IT
All components

Wine pairing button

Buttons, Hover, SVGGSAP, CSS onlyMediumCompressed weight: Demo 9.5 KBGSAP 28 KBFreeDownload the zip

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.

The code

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>+&#8364;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>

Playground

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

Or ask your AI assistant for it

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 site
Platform licenseFree on your sites and your clients’ sites. Want it inside a website builder, a template platform or a client dashboard? There’s a license for agencies and platforms.

What it does

On an almost black background, warmed by a low burgundy light and a very fine grain, a pill button 60 pixels tall sits alone in the centre, made of smoked glass: the top edge catches the light in one pixel, the bottom one stays in shadow, a soft shoulder of light sits on the upper half and under the button the table takes the colour of the wine. Inside, on the floor, rests a thin layer of red wine with a glossy surface; over the wine sit the drawn goblet (with its own wine inside), the words Add wine pairing and a glass capsule with the price, +€48. With the mouse over it the wine rises a hair and leans towards the pointer like a spirit level, on a spring that takes it past and back, and a soft light follows the pointer in the glass. Pressed, the glass sinks a pixel and the wine sloshes. Then the button pours the five glasses of the menu: for each course a thin stream falls from the top, the level rises with a ripple that runs across the surface and dies down, the wine changes colour (golden Franciacorta with rising bubbles, straw Vermentino, Rosato, garnet Nebbiolo, ruby Recioto) and the glass breathes by a pixel; the words roll through the name of the wine and the capsule through the course (Raw bar, Risotto, Sea bass, Lamb, Dessert). The goblet in the icon fills too. At the end the wine settles, a diagonal reflection crosses the glass, the goblet folds away, a champagne-coloured check draws itself in its place, the words become Pairing added and the capsule 5 glasses. After a moment the wine drains back to the floor with a last slosh and the button is ready. Until someone touches it, it goes round by itself.

How it works

The wine is a small model

The 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.

The surface, redrawn

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.

A spring for the level

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.

Five pours in a timeline

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.

Rolling words

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.

Values to change

NameFileDefaultWhat it changes
LABEL_RESTscript.jsAdd wine pairingThe words at rest.
LABEL_DONEscript.jsPairing addedThe words at the end.
PRICEscript.js+€48The capsule at rest: what the pairing costs.
GLASSESscript.js5 glassesThe capsule at the end.
POURscript.js0.62Seconds for each of the five pours.
FULLscript.js0.72How full the button gets at the end, as a share of its height.
REST_LEVELscript.js0.13How much wine rests on the button’s floor.
TILTscript.js7How far the wine leans towards the pointer, in pixels at the edge.
SLOSHscript.js1How lively the wine is: 0.4 thick and calm, 2 very sloshy.
FIZZscript.js12How many bubbles rise in the sparkling wine.
HOLDscript.js1.7Seconds Pairing added stays before going back.
AUTOscript.jstrueGoes round by itself until someone touches it.

Try them in the Playground

When to use 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 phones

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.

With reduced motion

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.

Pitfalls

  • The wine’s gradient is in its path’s coordinates: with a single colour the wine looked like a flat slab; three stops (lighter under the surface, the colour, the dark bottom) give it depth.
  • The frosted glass over the wine bleached it and made it look dusty: the grain went down to 7% and the glass’s white light only sits on the upper half.
  • The wine in the ticker must not redraw when still: a key of rounded values skips the drawing when nothing changed (except while the bubbles rise).
  • White text on the golden wine lost contrast: the wine colours are saturated and the gradient’s bottom darkened, with a two-pixel shadow under the letters.

Libraries

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.

Testing

Tested on 2 November 2026

  • Desktop: Done
  • Phone: Done
  • Reduced motion: Done
  • Safari on iPhone: To do

License

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.

All components