
The elastic button
Buttons, Hover, Text
An app’s tab bar in liquid glass, on black: the lens does not slide, it pours. It empties where it was, a drop crosses the bar squeezing as it runs and the lens forms again under the chosen tab, its highlight coming back and the word opening under the icon.
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>
<!--
"Pouring glass tab bar" 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>Liquid glass tab bar</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">
<span class="glow" aria-hidden="true"></span>
<!-- a tab bar of liquid glass: the lens does not slide, it pours: it empties where it was,
a drop crosses the bar and the lens fills up again under the chosen tab -->
<nav class="tb" data-tb role="tablist" aria-label="App sections">
<svg class="tb__defs" width="0" height="0" aria-hidden="true" focusable="false">
<filter id="tb-goo" x="-20%" y="-60%" width="140%" height="220%" color-interpolation-filters="sRGB">
<feGaussianBlur in="SourceGraphic" stdDeviation="6" result="b"></feGaussianBlur>
<feColorMatrix in="b" values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 22 -10"></feColorMatrix>
</filter>
</svg>
<span class="tb__glass" aria-hidden="true">
<span class="tb__goo"><i data-tail></i><i data-drop></i><i data-head></i></span>
<span class="tb__shine" data-shine></span>
</span>
<button class="tb__tab" type="button" role="tab" data-tab aria-selected="true">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4 11 12 4l8 7v8.500H4z"></path><path d="M10 19.500V14h4v5.500"></path></svg>
<span>Home</span>
</button>
<button class="tb__tab" type="button" role="tab" data-tab aria-selected="false" tabindex="-1">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="11" cy="11" r="6.500"></circle><path d="m16 16 4 4"></path></svg>
<span>Search</span>
</button>
<button class="tb__tab" type="button" role="tab" data-tab aria-selected="false" tabindex="-1">
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6.500 4h11v16l-5.500-4-5.500 4z"></path></svg>
<span>Saved</span>
</button>
<button class="tb__tab" type="button" role="tab" data-tab aria-selected="false" tabindex="-1">
<svg viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="9" r="4"></circle><path d="M4.500 20c1.200-3.600 4-5 7.500-5s6.300 1.400 7.500 5"></path></svg>
<span>Profile</span>
</button>
</nav>
<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.
15 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 “Pouring glass tab bar” from Animorio and fit it into my siteThe lens is three white shapes inside a layer with an SVG filter: a blur and then a matrix that raises the alpha channel’s contrast. Where the shapes are close the blurred edges add up and melt into one liquid.
The tail shrinks to zero where it was, the drop goes from one point to the other, the head grows from zero where it lands. Three staggered tweens on one timeline: the filter makes the thread that stretches and snaps.
The filter needs solid shapes, so the transparency goes on the whole layer, afterwards. The highlight sits outside the filter, in its own element, because blurred it would vanish.
| Name | File | Default | What it changes |
|---|---|---|---|
TINT_A | script.js | #6f5cff | The first colour behind the bar. |
TINT_B | script.js | #18b9a5 | The second colour behind the bar. |
START | script.js | 0 | The tab chosen at first (0 = Home, 3 = Profile). |
POUR | script.js | 0.55 | How many seconds the glass takes to pass from one tab to another. |
DROP | script.js | 0.5 | How big the travelling drop is compared with the lens (0.2 to 0.9). |
GLASS | script.js | 0.2 | How dense the lens’s glass is (0.05 to 0.5). |
LOOP | script.js | true | Left alone, a pointer taps the tabs one after another. |
At the bottom of a phone app’s screen, in a site’s mobile version, in a music, travel or photo app with a glass look; and wherever a few sections are switched with one tap.
The same bar, as wide as the screen: the tabs are tapped with a thumb and the lens’s landing points are worked out again if the width changes.
No pouring: tapping a tab, the lens and its highlight are already under it and the word appears without motion.
GSAP 3.15.0, Mona Sans (font variabile) 5.3.0.
Compressed with gzip, the three demo files weigh 4.7 KB; the libraries: GSAP 28 KB.
Tested on 19 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.