"use client";
import { LiquidGlassTabBar } from "@/components/LiquidGlassTabBar";
export default function Nav() {
return <LiquidGlassTabBar onTabChange={(id) => console.log(id)} />;
}
Animated tab bar in a shadcn or UI-kit app: scope the CSS first
Import tabbar-liquid.css as it ships only when the tab bar runs on its own, like the demo. The file is unlayered and has global rules: it gives html and body a dark background and its own font, resets every button, puts --muted and other colours on :root, and turns every .grid into two columns with a 14px gap.
In a shadcn app on Tailwind v4 those rules beat Tailwind's layered styles. We measured it on October 25, 2026: a shadcn Button lost its background and padding, a grid gap-2 split into two columns, bg-muted changed colour, and the body went dark in Space Grotesk. Other kits that style button, body or .grid can clash the same way; we've only measured shadcn.
The fix is two edits to your copy of the file, below: wrap it in @scope (.qd-tabbar) to (.qd-screen) and change :root to :scope. Then wrap the component in a qd-tabbar div with a native div inside it. The rules stay inside that wrapper.
We measured the scoped edit in a scratch shadcn app for the shadcn bottom navigation guide (linked under More for React), which has the full explanation and a three-line component edit for putting your own screens inside the bar. This page didn't run it again.
Browser support for @scope, from MDN's compatibility data and caniuse, both read October 25, 2026: Chrome and Edge 118+, Firefox 146+, Safari 17.4+ on Mac and iPhone. Safari 26.0 to 26.3 has a partial version that skips input and textarea elements, and the bar has neither. A browser without @scope drops the whole block, so the bar shows up unstyled there.
If you have to support older browsers, prefix every selector in your copy with .qd-tabbar instead of using @scope, and turn :root into .qd-tabbar. That keeps the file off your html, body and the rest of your app in every browser. It has no lower edge, though, so the bar's button reset and .grid rule still reach anything you put inside the bar. We haven't measured that version.
components/tabbar-liquid.css
/* components/tabbar-liquid.css (your copy). Edit 1: the file's first rule was ":root{". */
@scope (.qd-tabbar) to (.qd-screen) {
:scope{font-family:var(--font-ui);color:var(--text);
--ink:#0A0A0D;--surface:#111218; /* ...every variable that was on :root stays here... */
}
/* ...the rest of the file stays as it is... */
/* Edit 2: hide the demo's 9:41 status bar, then close the @scope block. */
.sb{display:none}
}
app/Nav.tsx (the wrapper)
// app/Nav.tsx: give the scoped CSS a root. "native" fills the screen instead of the demo's phone frame.
<div className="h-dvh">
<div className="qd-tabbar relative h-full">
<div className="native">
<LiquidGlassTabBar autoplayDemo={false} onTabChange={(id) => console.log(id)} />
</div>
</div>
</div>
Install
Copy from the zipPut react/src/components + react/src/data into src/, then npm i framer-motion.
Or ask your AIPaste PROMPT.md into Cursor, Lovable or v0.
Props
data
your tabs, now playing and covers
onTabChange
called with the tab id
onOpenPlayer
the drop burst into the player
autoplayDemo
loops the demo until the first tap
How qodesign compares
qodesign vs Hover.devHover.dev is best for: animated website sections you copy and paste.
qodesign vs Cult UICult UI is best for: free animated shadcn components and device mockups.
All comparisons, with prices read on each library's own site.
Yes, as a client component. Keep "use client" at the top of the file that renders it, as in the snippet above. App Router and Pages Router both work.
Does it work on iPhone Safari?
Yes. The glass uses backdrop-filter, which Safari on iPhone supports.
Will the tab bar change my shadcn styles?
Imported as shipped, yes. Its CSS is global and we measured shadcn Buttons losing their background and padding. Scope your copy with the @scope edit on this page and it stays inside its wrapper.
Can Cursor or v0 add it for me?
Yes. Each download has a PROMPT.md. Paste it into Cursor, Lovable, v0 or Claude Code and it fits the piece into your app.
Can I use it in client work?
Yes, in personal and client projects. You can't resell the code itself as a kit.