{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "header-13",
  "type": "registry:block",
  "description": "Docs header with a Ctrl+K command search overlay that filters guides and endpoints, plus a scrollable mobile nav row.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/designali/blocks/header/header-13.tsx",
      "content": "\"use client\"\n\nimport { useEffect, useMemo, useRef, useState } from \"react\"\nimport {\n  ArrowRight,\n  BookOpen,\n  CornerDownLeft,\n  FileCode,\n  Hash,\n  Search,\n  X,\n} from \"@designali/icons\"\n\nconst pages = [\n  { title: \"Getting started\", section: \"Guides\", icon: BookOpen },\n  { title: \"Installation\", section: \"Guides\", icon: BookOpen },\n  { title: \"Theming\", section: \"Guides\", icon: BookOpen },\n  { title: \"@designali/icons\", section: \"Packages\", icon: FileCode },\n  { title: \"@designali/logos\", section: \"Packages\", icon: FileCode },\n  { title: \"Bento\", section: \"Components\", icon: Hash },\n  { title: \"Number Counter\", section: \"Components\", icon: Hash },\n]\n\nconst links = [\"Guides\", \"Components\", \"Packages\", \"Blogs\"]\n\nexport default function Header13() {\n  const [open, setOpen] = useState(false)\n  const [query, setQuery] = useState(\"\")\n  const inputRef = useRef<HTMLInputElement>(null)\n\n  const results = useMemo(\n    () => pages.filter((page) => page.title.toLowerCase().includes(query.toLowerCase())),\n    [query]\n  )\n\n  useEffect(() => {\n    function onKey(event: KeyboardEvent) {\n      if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === \"k\") {\n        event.preventDefault()\n        setOpen((value) => !value)\n      }\n      if (event.key === \"Escape\") setOpen(false)\n    }\n    window.addEventListener(\"keydown\", onKey)\n    return () => window.removeEventListener(\"keydown\", onKey)\n  }, [])\n\n  useEffect(() => {\n    if (open) inputRef.current?.focus()\n  }, [open])\n\n  return (\n    <section className=\"w-full bg-background\">\n      <header className=\"relative border-b\">\n        <div className=\"mx-auto flex h-14 max-w-7xl items-center gap-6 px-6\">\n          <a href=\"#\" className=\"flex shrink-0 items-center gap-2 text-sm font-semibold\">\n            <span className=\"flex size-6 items-center justify-center bg-foreground font-sans text-[11px] text-background\">\n              d/\n            </span>\n            Designali Docs\n          </a>\n          <nav className=\"hidden gap-5 text-sm lg:flex\">\n            {links.map((link, index) => (\n              <a\n                key={link}\n                href=\"#\"\n                className={index === 0 ? \"text-foreground\" : \"text-muted-foreground hover:text-foreground\"}\n              >\n                {link}\n              </a>\n            ))}\n          </nav>\n          <button\n            type=\"button\"\n            onClick={() => setOpen(true)}\n            className=\"ms-auto hidden h-9 w-full max-w-xs items-center gap-2 border bg-muted/40 px-3 text-sm text-muted-foreground transition-colors hover:bg-muted sm:flex\"\n          >\n            <Search className=\"size-4\" />\n            Search documentation\n            <kbd className=\"ms-auto border bg-background px-1.5 font-mono text-[10px]\">Ctrl K</kbd>\n          </button>\n          <button\n            type=\"button\"\n            onClick={() => setOpen(true)}\n            aria-label=\"Search documentation\"\n            className=\"ms-auto flex size-9 items-center justify-center border sm:hidden\"\n          >\n            <Search className=\"size-4\" />\n          </button>\n          <a href=\"#\" className=\"hidden shrink-0 items-center gap-1 text-sm md:flex\">\n            Dashboard\n            <ArrowRight className=\"size-3.5\" />\n          </a>\n        </div>\n        <nav className=\"flex gap-5 overflow-x-auto border-t px-6 py-2.5 text-sm lg:hidden\">\n          {links.map((link, index) => (\n            <a\n              key={link}\n              href=\"#\"\n              className={index === 0 ? \"shrink-0 text-foreground\" : \"shrink-0 text-muted-foreground\"}\n            >\n              {link}\n            </a>\n          ))}\n        </nav>\n\n        {open && (\n          <div className=\"absolute inset-x-0 top-0 z-30 flex min-h-[420px] justify-center bg-background/70 px-4 pt-4 backdrop-blur-sm sm:pt-16\">\n            <div className=\"h-fit w-full max-w-lg border bg-background shadow-2xl\" role=\"dialog\" aria-label=\"Search\">\n              <div className=\"flex items-center gap-3 border-b px-4\">\n                <Search className=\"size-4 text-muted-foreground\" />\n                <input\n                  ref={inputRef}\n                  value={query}\n                  onChange={(event) => setQuery(event.target.value)}\n                  placeholder=\"Search guides and components...\"\n                  className=\"h-12 w-full min-w-0 bg-transparent text-sm outline-none placeholder:text-muted-foreground\"\n                />\n                <button type=\"button\" onClick={() => setOpen(false)} aria-label=\"Close search\">\n                  <X className=\"size-4 text-muted-foreground\" />\n                </button>\n              </div>\n              <ul className=\"max-h-72 overflow-y-auto p-2\">\n                {results.length === 0 && (\n                  <li className=\"px-3 py-8 text-center text-sm text-muted-foreground\">\n                    No results for &ldquo;{query}&rdquo;\n                  </li>\n                )}\n                {results.map((page) => (\n                  <li key={page.title}>\n                    <a href=\"#\" className=\"group flex items-center gap-3 px-3 py-2.5 text-sm hover:bg-muted\">\n                      <page.icon className=\"size-4 text-muted-foreground\" />\n                      <span className=\"min-w-0 flex-1 truncate\">{page.title}</span>\n                      <span className=\"text-xs text-muted-foreground\">{page.section}</span>\n                      <CornerDownLeft className=\"size-3.5 text-muted-foreground opacity-0 group-hover:opacity-100\" />\n                    </a>\n                  </li>\n                ))}\n              </ul>\n            </div>\n          </div>\n        )}\n      </header>\n    </section>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "480px"
  },
  "categories": [
    "header"
  ]
}