{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "header-04",
  "type": "registry:block",
  "description": "A simple header section.",
  "registryDependencies": [
    "button",
    "command",
    "toggle",
    "separator"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/header/header-04/page.tsx",
      "content": "import { Header } from \"@/registry/designali/blocks/header/header-04/components/header\"\n\nexport default function Header04() {\n  return (\n    <div className=\"flex min-h-screen w-full flex-col\">\n      <Header />\n      <main className=\"flex-1\">\n        <section className=\"flex h-screen items-center justify-center\">\n          <h1 className=\"text-4xl font-bold\">Hero</h1>\n        </section>\n\n        <section className=\"flex h-screen items-center justify-center\">\n          <h1 className=\"text-4xl font-bold\">Section</h1>\n        </section>\n      </main>\n    </div>\n  )\n}\n",
      "type": "registry:component",
      "target": "header/index.tsx"
    },
    {
      "path": "registry/designali/blocks/header/header-04/components/header.tsx",
      "content": "\"use client\"\n\nimport React from \"react\"\nimport Link from \"next/link\"\nimport {\n  Menu,\n  X,\n} from \"@designali/icons\"\nimport { useScroll } from \"motion/react\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Separator } from \"@workspace/ui/components/separator\"\n\nimport { Search } from \"./search\"\nimport { ModeToggle } from \"./theme-switch\"\nimport { Logo } from \"@workspace/ui/designali/logo\"\n\nconst menuItems = [\n  { name: \"Templates\", href: \"/templates\" },\n  { name: \"Blocks\", href: \"/blocks\" },\n  { name: \"Icons\", href: \"/icons\" },\n  { name: \"Pricing\", href: \"/pricing\" },\n  { name: \"Docs\", href: \"/docs\" },\n]\n\nexport const Header = () => {\n  const [menuState, setMenuState] = React.useState(false)\n  const [scrolled, setScrolled] = React.useState(false)\n\n  const { scrollYProgress } = useScroll()\n\n  React.useEffect(() => {\n    const unsubscribe = scrollYProgress.on(\"change\", (latest) => {\n      setScrolled(latest > 0.05)\n    })\n    return () => unsubscribe()\n  }, [scrollYProgress])\n\n  return (\n    <header>\n      <nav\n        data-state={menuState && \"active\"}\n        className={cn(\n          \"fixed z-20 h-14 w-full border-b transition-colors duration-150\",\n          scrolled && \"bg-background/50 backdrop-blur-xl\"\n        )}\n      >\n        <div className=\"h-full px-3 transition-all duration-300\">\n          <div className=\"relative flex h-full flex-wrap items-center justify-between gap-3 lg:gap-0\">\n            <div className=\"flex h-full w-full items-center justify-between gap-6 lg:w-auto\">\n              <a\n                href=\"/\"\n                aria-label=\"Designali home\"\n                className=\"-mr-3 flex items-center gap-2 whitespace-nowrap\"\n              >\n                <Logo className=\"size-8\" />\n              </a>\n\n              <Separator className=\"hidden lg:block\" orientation=\"vertical\" />\n\n              <button\n                onClick={() => setMenuState(!menuState)}\n                aria-label={menuState == true ? \"Close Menu\" : \"Open Menu\"}\n                className=\"relative z-20 -m-2.5 mr-2 block cursor-pointer p-2.5 lg:hidden\"\n              >\n                <Menu className=\"m-auto size-6 duration-200 in-data-[state=active]:scale-0 in-data-[state=active]:rotate-180 in-data-[state=active]:opacity-0\" />\n                <X className=\"absolute inset-0 m-auto size-6 scale-0 -rotate-180 opacity-0 duration-200 in-data-[state=active]:scale-100 in-data-[state=active]:rotate-0 in-data-[state=active]:opacity-100\" />\n              </button>\n\n              <div className=\"hidden lg:block\">\n                <ul className=\"flex gap-10 text-sm\">\n                  {menuItems.map((item, index) => (\n                    <li key={index}>\n                      <Link\n                        href={item.href}\n                        className=\"block text-muted-foreground duration-150 hover:text-accent-foreground\"\n                      >\n                        <span>{item.name}</span>\n                      </Link>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n            </div>\n\n            <div className=\"mb-6 hidden w-full flex-wrap items-center justify-end space-y-8 rounded-3xl border bg-background p-6 shadow-2xl in-data-[state=active]:block md:flex-nowrap lg:m-0 lg:flex lg:h-14 lg:w-fit lg:gap-4 lg:space-y-0 lg:border-transparent lg:bg-transparent lg:p-0 lg:shadow-none lg:in-data-[state=active]:flex dark:shadow-none dark:lg:bg-transparent\">\n              <div className=\"lg:hidden\">\n                <ul className=\"space-y-6 text-base\">\n                  {menuItems.map((item, index) => (\n                    <li key={index}>\n                      <Link\n                        href={item.href}\n                        className=\"block text-muted-foreground duration-150 hover:text-accent-foreground\"\n                      >\n                        <span>{item.name}</span>\n                      </Link>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n              <Separator orientation=\"vertical\" />\n              <Search />\n              <Separator orientation=\"vertical\" />\n              <ModeToggle />\n              <Separator orientation=\"vertical\" />\n              <div className=\"flex w-full flex-col space-y-3 sm:flex-row sm:gap-3 sm:space-y-0 md:w-fit\">\n                <Button variant=\"outline\" size=\"sm\">\n                  <Link href=\"/login\">\n                    <span>Login</span>\n                  </Link>\n                </Button>\n                <Button size=\"sm\">\n                  <Link href=\"/pricing\">\n                    <span>Get Designali</span>\n                  </Link>\n                </Button>\n              </div>\n            </div>\n          </div>\n        </div>\n      </nav>\n    </header>\n  )\n}\n",
      "type": "registry:component"
    },
    {
      "path": "registry/designali/blocks/header/header-04/components/theme-switch.tsx",
      "content": "\"use client\"\n\nimport {\n  Moon,\n  Sun,\n} from \"@designali/icons\"\nimport { useTheme } from \"next-themes\"\n\nimport { Toggle } from \"@workspace/ui/components/toggle\"\n\nexport function ModeToggle() {\n  const { resolvedTheme, setTheme } = useTheme()\n\n  const isDark = resolvedTheme === \"dark\"\n\n  return (\n    <div className=\"flex flex-col justify-center\">\n      <Toggle\n        className=\"group size-9 cursor-pointer bg-secondary data-[state=on]:bg-transparent data-[state=on]:hover:bg-muted dark:bg-secondary\"\n        pressed={isDark}\n        onPressedChange={() => setTheme(isDark ? \"light\" : \"dark\")}\n        aria-label={`Switch to ${isDark ? \"light\" : \"dark\"} mode`}\n      >\n        <Moon\n          size={16}\n          className=\"shrink-0 scale-0 opacity-0 transition-all group-data-[state=on]:scale-100 group-data-[state=on]:opacity-100\"\n          aria-hidden=\"true\"\n        />\n\n        <Sun\n          size={16}\n          className=\"absolute shrink-0 scale-100 opacity-100 transition-all group-data-[state=on]:scale-0 group-data-[state=on]:opacity-0\"\n          aria-hidden=\"true\"\n        />\n      </Toggle>\n    </div>\n  )\n}\n",
      "type": "registry:component"
    },
    {
      "path": "registry/designali/blocks/header/header-04/components/search.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport {\n  ArrowUpRight as ArrowUpRightIcon,\n  FilePlusCorner as FilePlus2Icon,\n  LayoutTemplate as LayoutTemplateIcon,\n  Palette as PaletteIcon,\n  PenTool as PenToolIcon,\n  Search as SearchIcon,\n} from \"@designali/icons\"\n\nimport {\n  Command,\n  CommandDialog,\n  CommandEmpty,\n  CommandGroup,\n  CommandInput,\n  CommandItem,\n  CommandList,\n  CommandSeparator,\n  CommandShortcut,\n} from \"@workspace/ui/components/command\"\n\nexport function Search() {\n  const [open, setOpen] = React.useState(false)\n\n  React.useEffect(() => {\n    const down = (e: KeyboardEvent) => {\n      if (e.key === \"k\" && (e.metaKey || e.ctrlKey)) {\n        e.preventDefault()\n        setOpen((open) => !open)\n      }\n    }\n\n    document.addEventListener(\"keydown\", down)\n\n    return () => {\n      document.removeEventListener(\"keydown\", down)\n    }\n  }, [])\n\n  return (\n    <div className=\"\">\n      <button\n        type=\"button\"\n        onClick={() => setOpen(true)}\n        className=\"hidden h-9 w-full max-w-xs items-center border border-input bg-background px-3 py-2 text-sm shadow-xs transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 lg:inline-flex\"\n      >\n        <span className=\"flex grow items-center\">\n          <SearchIcon\n            className=\"-ms-1 me-3 text-muted-foreground/80\"\n            size={16}\n            aria-hidden=\"true\"\n          />\n\n          <span className=\"font-normal text-muted-foreground/70\">\n            Search Designali...\n          </span>\n        </span>\n\n        <kbd className=\"ms-12 -me-1 inline-flex h-5 items-center border bg-background px-1 font-[inherit] text-[0.625rem] font-medium text-muted-foreground/70\">\n          ⌘K\n        </kbd>\n      </button>\n\n      {/* Command Dialog */}\n      <CommandDialog open={open} onOpenChange={setOpen}>\n        <Command>\n          <CommandInput placeholder=\"Search blocks, templates, icons, or docs...\" />\n\n          <CommandList>\n            <CommandEmpty>No matches found.</CommandEmpty>\n\n            {/* Create */}\n            <CommandGroup heading=\"Create\">\n              <CommandItem>\n                <FilePlus2Icon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>New project</span>\n\n                <CommandShortcut>⌘N</CommandShortcut>\n              </CommandItem>\n\n              <CommandItem>\n                <LayoutTemplateIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>New template</span>\n\n                <CommandShortcut>⌘T</CommandShortcut>\n              </CommandItem>\n\n              <CommandItem>\n                <PenToolIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>Start design</span>\n\n                <CommandShortcut>⌘S</CommandShortcut>\n              </CommandItem>\n            </CommandGroup>\n\n            <CommandSeparator />\n\n            {/* Navigate */}\n            <CommandGroup heading=\"Navigate\">\n              <CommandItem>\n                <ArrowUpRightIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>Go to work</span>\n              </CommandItem>\n\n              <CommandItem>\n                <ArrowUpRightIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>Go to templates</span>\n              </CommandItem>\n\n              <CommandItem>\n                <ArrowUpRightIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>Go to documentation</span>\n              </CommandItem>\n\n              <CommandItem>\n                <ArrowUpRightIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>Go to blocks</span>\n              </CommandItem>\n\n              <CommandItem>\n                <ArrowUpRightIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>Go to icons</span>\n              </CommandItem>\n            </CommandGroup>\n\n            <CommandSeparator />\n\n            {/* Themes */}\n            <CommandGroup heading=\"Themes\">\n              <CommandItem>\n                <PaletteIcon\n                  size={16}\n                  className=\"opacity-60\"\n                  aria-hidden=\"true\"\n                />\n\n                <span>Switch theme</span>\n\n                <CommandShortcut>⌘⇧T</CommandShortcut>\n              </CommandItem>\n            </CommandGroup>\n          </CommandList>\n        </Command>\n      </CommandDialog>\n    </div>\n  )\n}\n",
      "type": "registry:component"
    }
  ],
  "meta": {
    "iframeHeight": "500px"
  },
  "categories": [
    "header"
  ]
}