About
A horizontal liquid glass top bar with two signals: a liquid drop that slides and settles on the current page, and a light that follows the pointer or keyboard focus. Labels collapse to icons on narrow screens. Tune frost, opacity, refraction and beam strength.
Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Liquid Glass Spotlight Navigation to your project and fits it to your theme.
Code
How Liquid Glass Spotlight Navigation is used: the demo's code. The component's own source comes with a free account.
Usage.tsx
"use client";
import { useState, type MouseEvent } from "react";
import { Activity, BellRing, Gauge, Server, Settings2, Waypoints } from "lucide-react";
import "@fontsource-variable/manrope";
import LiquidGlassSpotlightNavigation, {
type SpotlightItem,
} from "@/components/ui/liquid-glass-spotlight-navigation";
const settings = {
beamStrength: 0.8,
frost: 6,
glassOpacity: 0.66,
refraction: 18,
edgeLight: 1,
followPointer: true,
};
const destinations: SpotlightItem[] = [
{ id: "overview", href: "#overview", label: "Overview", icon: <Gauge /> },
{ id: "services", href: "#services", label: "Services", icon: <Server /> },
{ id: "incidents", href: "#incidents", label: "Incidents", icon: <Activity />, badge: "2 open incidents" },
{ id: "traces", href: "#traces", label: "Traces", icon: <Waypoints /> },
{ id: "alerts", href: "#alerts", label: "Alert rules", icon: <BellRing /> },
];
const secondary: SpotlightItem[] = [
{ id: "settings", href: "#settings", label: "Settings", icon: <Settings2 /> },
];
// Photo: Purple and pink flow, Milad Fakurian on Unsplash. A light scrim in the theme background colour keeps it in step with light and dark mode.
const demoStyles = `
.stage { font-family: "Manrope Variable", Manrope, system-ui, sans-serif; }
.stage-field {
background: var(--color-muted) url("https://cdn.21st.dev/assets/mirror/e1/e1b7d157fd8f2a8b605db69e4c379822e619632d4f7c5cdb559f889deee413ae.jpg") center / cover no-repeat;
}
.stage-scrim {
background: linear-gradient(180deg, color-mix(in srgb, var(--color-background) 30%, transparent), color-mix(in srgb, var(--color-background) 8%, transparent) 55%, color-mix(in srgb, var(--color-background) 22%, transparent));
}
`;
export default function LiquidGlassSpotlightNavigationDemo(props: Partial<typeof settings> = {}) {
const s = { ...settings, ...props };
const [activeId, setActiveId] = useState("incidents");
const onNavigate = (item: SpotlightItem, event: MouseEvent<HTMLAnchorElement>) => {
event.preventDefault();
setActiveId(item.id);
};
return (
<main className="stage grid h-svh min-h-[360px] w-full place-items-center bg-background p-4 text-foreground sm:p-6">
<style>{demoStyles}</style>
<div className="stage-field relative isolate grid h-full max-h-[520px] w-full max-w-[920px] place-items-center overflow-hidden rounded-3xl border border-border px-3 sm:px-6">
<div className="stage-scrim absolute inset-0 -z-10" aria-hidden="true" />
<div className="w-full min-w-0 max-w-[760px]">
<LiquidGlassSpotlightNavigation
items={destinations}
secondaryItems={secondary}
activeId={activeId}
onNavigate={onNavigate}
label="Console"
beamStrength={s.beamStrength * 1.25}
followPointer={s.followPointer}
glass={{ blur: s.frost, opacity: s.glassOpacity, edge: s.edgeLight, distortion: s.refraction }}
/>
</div>
</div>
</main>
);
}
















