About
Liquid bottom tab bar: the selected tab rides a bead the bar dips under, and the dip leans and stretches as it moves. Drag the bead, use arrow keys, light and dark. Full component: codeandchill.store/components/meniscus?utm_source=21st
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Meniscus — Liquid Bottom Navigation Bar to your project and fits it to your theme.
Code
How Meniscus — Liquid Bottom Navigation Bar is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
import { useEffect, useState } from "react";
import { AnimatePresence, motion, useReducedMotion } from "motion/react";
import MeniscusTabBar, { DEFAULT_ITEMS } from "@/components/ui/meniscus-liquid-tab-bar";
const settings = {
stiffness: 140,
liquid: 1,
height: 78,
};
const LINES = [
"Everything, on one surface.",
"You, as the app sees you.",
"Three unread. All of them kind.",
"Point it. It already focused.",
"Fewer switches. Better defaults.",
];
export default function Demo(props: Partial<typeof settings> = {}) {
const s = { ...settings, ...props };
const reduce = useReducedMotion();
const [index, setIndex] = useState(0);
// Meniscus is a dark component: open dark, then follow the page's `dark` class when it changes.
const [dark, setDark] = useState(true);
useEffect(() => {
const html = document.documentElement;
const mo = new MutationObserver(() => setDark(html.classList.contains("dark")));
mo.observe(html, { attributes: true, attributeFilter: ["class"] });
return () => mo.disconnect();
}, []);
const item = DEFAULT_ITEMS[index];
const room = dark
? "radial-gradient(88% 52% at 50% 4%, #342846, transparent 76%), linear-gradient(180deg, #2b2138, #110c18)"
: "radial-gradient(88% 52% at 50% 4%, #ffffff, transparent 76%), linear-gradient(180deg, #f3eef8, #e2daec)";
return (
<div
className="relative flex min-h-[100dvh] w-full flex-col items-center justify-center gap-16 overflow-hidden px-5 py-12"
style={{ background: room, backgroundColor: dark ? "#110c18" : "#e2daec", color: dark ? "#f6f2f8" : "#1a1420" }}
>
{/* Ambient wash that takes the selected tab's colour */}
<motion.div
aria-hidden
className="pointer-events-none absolute inset-0"
initial={false}
animate={{ background: `radial-gradient(38% 27% at 50% 68%, ${item.accent}${dark ? "33" : "40"}, transparent 74%)` }}
transition={{ duration: reduce ? 0 : 0.6, ease: "easeInOut" }}
/>
<div className="relative grid w-full max-w-[640px] text-center" aria-live="polite">
<AnimatePresence mode="popLayout" initial={false}>
<motion.div
key={index}
style={{ gridArea: "1 / 1" }}
initial={reduce ? false : { opacity: 0, y: 16, filter: "blur(6px)" }}
animate={{ opacity: 1, y: 0, filter: "blur(0px)" }}
exit={reduce ? undefined : { opacity: 0, y: -10, filter: "blur(6px)" }}
transition={{ duration: 0.5, ease: [0.16, 0.84, 0.28, 1] }}
>
<h2 className="m-0 text-[clamp(52px,13vw,112px)] font-bold leading-[.92] tracking-[-0.035em]">{item.label}</h2>
<p className="mt-4 text-[15px]" style={{ color: dark ? "#bcb3ca" : "#5d5470" }}>
{LINES[index]}
</p>
</motion.div>
</AnimatePresence>
</div>
<MeniscusTabBar
className="relative"
value={index}
onChange={setIndex}
theme={dark ? "dark" : "light"}
stiffness={s.stiffness}
liquid={s.liquid}
height={s.height}
/>
<p className="relative m-0 text-[13px]" style={{ color: dark ? "#a8a0b8" : "#5d5470" }}>
Tap a tab, or drag the bead along the bar.
</p>
</div>
);
}
















