Pedro

Liquid Glass Tab Bar

Navigation

About

An interactive iOS 26 inspired Liquid Glass navigation tab bar with velocity-reactive squash-and-stretch spring physics, real-time magnified lens cutout, symmetric specular edge reflections, rubber-band overscroll resistance, and full keyboard accessibility.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Liquid Glass Tab Bar to your project and fits it to your theme.

Code

How Liquid Glass Tab Bar is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

import React, { useState } from "react";
import { LiquidGlassTabBar } from "@/components/ui/liquid-glass-tab-bar";

export function DemoOne() {
  const [activeTab, setActiveTab] = useState("home");
  const [scene, setScene] = useState<"wallpaper" | "light">("wallpaper");

  return (
    <div className="flex w-full max-w-2xl flex-col items-center gap-4 p-4">
      <div
        className="relative flex h-[280px] w-full flex-col items-center justify-center overflow-hidden rounded-[32px] border border-zinc-200/80 px-5 shadow-md dark:border-zinc-800"
        style={
          scene === "wallpaper"
            ? {
                backgroundColor: "#0a0a0c",
                backgroundImage: [
                  "radial-gradient(ellipse 68% 95% at 68% 12%, rgba(255,255,255,0.95) 0%, rgba(228,228,231,0.75) 36%, rgba(63,63,70,0.35) 62%, transparent 78%)",
                  "radial-gradient(ellipse 52% 72% at 14% 72%, rgba(255,255,255,0.28) 0%, rgba(161,161,170,0.16) 44%, transparent 72%)",
                  "radial-gradient(ellipse 46% 65% at 88% 82%, rgba(255,255,255,0.48) 0%, rgba(113,113,122,0.22) 48%, transparent 75%)",
                ].join(", "),
              }
            : {
                backgroundColor: "#e4e4e7",
                backgroundImage:
                  "radial-gradient(circle at 22% 24%, #ffffff 0%, transparent 52%), radial-gradient(circle at 78% 76%, #a1a1aa 0%, transparent 56%)",
              }
        }
      >
        <LiquidGlassTabBar value={activeTab} onChange={setActiveTab} />

        <div className="absolute bottom-4 flex gap-1 rounded-full bg-black/55 p-1 text-xs font-medium text-white backdrop-blur-md">
          <button
            type="button"
            onClick={() => setScene("wallpaper")}
            className={`cursor-pointer rounded-full px-3 py-1 transition ${
              scene === "wallpaper"
                ? "bg-white text-zinc-950"
                : "text-white/80 hover:text-white"
            }`}
          >
            Dark Glass
          </button>
          <button
            type="button"
            onClick={() => setScene("light")}
            className={`cursor-pointer rounded-full px-3 py-1 transition ${
              scene === "light"
                ? "bg-white text-zinc-950"
                : "text-white/80 hover:text-white"
            }`}
          >
            Light Studio
          </button>
        </div>
      </div>

      <p className="text-xs text-zinc-500 dark:text-zinc-400">
        Hold on any tab to lift the Liquid Glass lens, or drag quickly across tabs.
      </p>
    </div>
  );
}

export default DemoOne;

More by Pedro

View all
  • Liquid Glass Theme Toggle

    Liquid Glass Theme Toggle

    22
  • Liquid Glass Toggle Switch

    Liquid Glass Toggle Switch

    5
  • Edge Cluster Status Card

    Edge Cluster Status Card

    4
  • Command Search Input

    Command Search Input

    4
  • Liquid Glass Viewport Toggle

    Liquid Glass Viewport Toggle

    2
  • Liquid Glass Button

    Liquid Glass Button

More in Navigation

View all
  • Footer with Big Wordmark

    Footer with Big Wordmark

    77
  • Liquid Glass Expandable Sidebar

    Liquid Glass Expandable Sidebar

    244
  • Sidebar

    Sidebar

    412
  • Button Breadcrumb

    Button Breadcrumb

    35
  • Menu

    Menu

    8
  • Pagination

    Pagination

    114
  • Pagination

    Pagination

    3
  • Oversized 404 Numeral

    Oversized 404 Numeral

    81