Components
Blur Navbar
A navbar that frosts over the page once you scroll.
Installation
npx shadcn@latest add https://ui.zjkm.tech/r/blur-navbar.jsonimport { BlurNavbar } from "@/components/blur-navbar"Using JavaScript? Set tsx: false in components.json and the CLI converts it.
New to shadcn? Run npx shadcn@latest init first. The CLI needs components.json and the @/ import alias.
Usage
A sticky navbar that's clear at the top of the page and frosts over the content once you scroll, with a hairline border.
import { BlurNavbar } from "@/components/blur-navbar";
export function SiteHeader({ path }: { path: string }) {
return <BlurNavbar brand="Acme" links={[{ label: "Pricing", href: "/pricing" }, { label: "Docs", href: "/docs" }]} current={path} />;
}Props
| Prop | Type | Default | Description |
|---|---|---|---|
brand | ReactNode | Your logo or name. | |
links | { label, href }[] | The links. | |
current | string | The current page's href. | |
actions | ReactNode | Shown at the right, e.g. a sign-in button. | |
className | string | Classes for the root element. |
With reduced motion, it frosts without a transition.