Skip to Content
zjkm-ui
Components

Blur Navbar

A navbar that frosts over the page once you scroll.

Props
<BlurNavbar brand="Acme" links={links} />

Installation

npx shadcn@latest add https://ui.zjkm.tech/r/blur-navbar.json
import { 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

PropTypeDefaultDescription
brandReactNodeYour logo or name.
links{ label, href }[]The links.
currentstringThe current page's href.
actionsReactNodeShown at the right, e.g. a sign-in button.
classNamestringClasses for the root element.

With reduced motion, it frosts without a transition.

On this page