{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "navbar-02",
  "title": "Floating Pill Navbar",
  "author": "VenusUI",
  "description": "A floating, rounded navigation bar that stays centered at the top of the page.",
  "dependencies": [
    "lucide-react"
  ],
  "files": [
    {
      "path": "registry/default/blocks/navbar-02/components/navbar-02.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport { Menu, X } from \"lucide-react\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst links = [\n  { label: \"Features\", href: \"#features\" },\n  { label: \"Pricing\", href: \"#pricing\" },\n  { label: \"Customers\", href: \"#customers\" },\n  { label: \"Docs\", href: \"#docs\" },\n]\n\n/**\n * A floating, rounded navigation bar that stays centered at the top of the\n * page. Collapses into a dropdown below `md`, with Escape to close.\n * Set `currentHref` from your router to highlight the current link.\n */\nexport function Navbar02({ currentHref = \"#features\" }: { currentHref?: string }) {\n  const [open, setOpen] = React.useState(false)\n  const toggleRef = React.useRef<HTMLButtonElement>(null)\n  const menuId = React.useId()\n\n  React.useEffect(() => {\n    if (!open) return\n    const onKeyDown = (event: KeyboardEvent) => {\n      if (event.key === \"Escape\") {\n        setOpen(false)\n        toggleRef.current?.focus()\n      }\n    }\n    document.addEventListener(\"keydown\", onKeyDown)\n    return () => document.removeEventListener(\"keydown\", onKeyDown)\n  }, [open])\n\n  return (\n    <div className=\"sticky top-4 z-40 px-4\">\n      <header className=\"mx-auto max-w-3xl rounded-2xl border bg-background/85 shadow-sm backdrop-blur\">\n        <div className=\"flex h-14 items-center gap-4 pr-2 pl-4\">\n          <a href=\"#\" className=\"flex items-center gap-2 font-semibold\">\n            <span aria-hidden=\"true\" className=\"size-5 rounded-full bg-foreground\" />\n            Acme\n          </a>\n          <nav aria-label=\"Main\" className=\"mx-auto hidden md:block\">\n            <ul className=\"flex items-center gap-1\">\n              {links.map((link) => (\n                <li key={link.href}>\n                  <a\n                    href={link.href}\n                    aria-current={link.href === currentHref ? \"page\" : undefined}\n                    className={cn(\n                      \"rounded-full px-3 py-1.5 text-sm transition-colors\",\n                      link.href === currentHref ? \"bg-muted text-foreground\" : \"text-muted-foreground hover:text-foreground\"\n                    )}\n                  >\n                    {link.label}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n          <a\n            href=\"#\"\n            className=\"ml-auto hidden h-9 items-center rounded-full bg-foreground px-4 text-sm font-medium text-background transition-opacity hover:opacity-90 md:inline-flex\"\n          >\n            Sign up\n          </a>\n          <button\n            ref={toggleRef}\n            type=\"button\"\n            className=\"ml-auto inline-flex size-9 items-center justify-center rounded-full outline-none hover:bg-muted focus-visible:ring-3 focus-visible:ring-ring/50 md:hidden\"\n            aria-expanded={open}\n            aria-controls={menuId}\n            aria-label={open ? \"Close menu\" : \"Open menu\"}\n            onClick={() => setOpen((value) => !value)}\n          >\n            {open ? <X aria-hidden=\"true\" className=\"size-5\" /> : <Menu aria-hidden=\"true\" className=\"size-5\" />}\n          </button>\n        </div>\n        <div id={menuId} hidden={!open} className=\"border-t px-2 py-2 md:hidden\">\n          <nav aria-label=\"Main\">\n            <ul>\n              {links.map((link) => (\n                <li key={link.href}>\n                  <a\n                    href={link.href}\n                    aria-current={link.href === currentHref ? \"page\" : undefined}\n                    onClick={() => setOpen(false)}\n                    className=\"block rounded-xl px-3 py-2 text-sm hover:bg-muted aria-[current=page]:bg-muted\"\n                  >\n                    {link.label}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n          <a href=\"#\" className=\"mt-2 flex h-10 items-center justify-center rounded-xl bg-foreground text-sm font-medium text-background\">\n            Sign up\n          </a>\n        </div>\n      </header>\n    </div>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "version": "0.1.0"
  },
  "categories": [
    "navbars"
  ],
  "type": "registry:block"
}