Skip to content
animorio
IT
All components

Pouring glass tab bar

Navigation, HoverGSAP, CSS onlyMediumCompressed weight: Demo 4.7 KBGSAP 28 KBFreeDownload the zip

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.

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>
<!--
  "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>

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.

15 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 “Pouring glass tab bar” 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 black, with two glows of colour behind it, a frosted glass bar with four icon tabs: Home, Search, Saved and Profile. Under the chosen tab sits a lens of lighter glass, with a highlight on its top edge, and under the icon its word. Tapping another tab, the lens does not slide there: the old one empties and shrinks, a smaller drop breaks off it with a thread of glass that stretches and snaps, crosses the bar squeezing as it runs and rounding again on arrival, and under the new tab the lens fills with a bounce and swallows the drop. The highlight, which cannot melt, fades where the lens was and returns where it lands; the icon gives a small elastic kick and the word opens beneath it. A tab further away asks for a slightly longer trip. The arrow keys work too.

How it works

Three shapes melted by the filter

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

Empty, travel, fill

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.

Glass after the melt

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.

Values to change

NameFileDefaultWhat it changes
TINT_Ascript.js#6f5cffThe first colour behind the bar.
TINT_Bscript.js#18b9a5The second colour behind the bar.
STARTscript.js0The tab chosen at first (0 = Home, 3 = Profile).
POURscript.js0.55How many seconds the glass takes to pass from one tab to another.
DROPscript.js0.5How big the travelling drop is compared with the lens (0.2 to 0.9).
GLASSscript.js0.2How dense the lens’s glass is (0.05 to 0.5).
LOOPscript.jstrueLeft alone, a pointer taps the tabs one after another.

Try them in the Playground

When to use it

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.

On phones

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.

With reduced motion

No pouring: tapping a tab, the lens and its highlight are already under it and the word appears without motion.

Pitfalls

  • An SVG filter on an animated layer has a cost: here the layer is only as big as the bar. On a bar as wide as the screen keep the blur low or test it on slow phones.
  • The bar’s backdrop-filter also needs the -webkit- prefix for Safari, and over a plain black ground it shows nothing: the glows behind are there for that.
  • The bar is a tablist: each tab is a button with role tab and aria-selected, only one is in the tab order and the arrows move the choice. The word under the icon tells which one is chosen, not the lens alone.

Libraries

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.

Testing

Tested on 19 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