{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "header-01",
  "type": "registry:block",
  "description": "A simple header section.",
  "registryDependencies": [
    "button",
    "navigation-menu",
    "toggle"
  ],
  "files": [
    {
      "path": "registry/designali/blocks/header/header-01/page.tsx",
      "content": "import { Header } from \"@/registry/designali/blocks/header/header-01/components/header\"\n\nexport default function Header01() {\n  return (\n    <div className=\"flex min-h-screen w-full flex-col overflow-hidden\">\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-01/components/header.tsx",
      "content": "\"use client\"\n\nimport React from \"react\"\nimport {\n  Equal,\n  X,\n} from \"@designali/icons\"\n\nimport { Menus } from \"@/registry/designali/blocks/header/header-01/components/menus\"\nimport { ModeToggle } from \"@/registry/designali/blocks/header/header-01/components/theme-switch\"\nimport { cn } from \"@workspace/ui/lib/utils\"\nimport { Button } from \"@workspace/ui/components/button\"\nimport { Logo } from \"@/src/components/logo\"\n\nconst menuItems = [\n  { name: \"Templates\", href: \"/templates\" },\n  { name: \"Blocks\", href: \"/blocks\" },\n  { name: \"Pricing\", href: \"/pricing\" },\n  { name: \"Docs\", href: \"/docs\" },\n]\n\nconst Header = () => {\n  const [menuState, setMenuState] = React.useState(false)\n  const [isScrolled, setIsScrolled] = React.useState(false)\n\n  React.useEffect(() => {\n    const handleScroll = () => {\n      setIsScrolled(window.scrollY > 4)\n    }\n    window.addEventListener(\"scroll\", handleScroll)\n    return () => window.removeEventListener(\"scroll\", handleScroll)\n  }, [])\n  return (\n    <header>\n      <nav\n        data-state={menuState && \"active\"}\n        className={cn(\n          \"fixed z-50 w-full transition-colors duration-300\",\n          isScrolled ? \"border-transparent\" : \"border-b border-dotted\"\n        )}\n      >\n        <div\n          className={cn(\n            \"mx-auto bg-background px-2 transition-all duration-300\",\n            isScrolled &&\n              \"max-w-5xl border-b bg-background/50 px-1 backdrop-blur-xl md:mt-2 md:border\"\n          )}\n        >\n          <div className=\"relative flex flex-wrap items-center justify-between gap-3 py-1\">\n            <div className=\"flex w-full justify-between md:w-auto\">\n              <a href=\"/\" aria-label=\"Designali home\" className=\"flex items-center gap-2\">\n                <Logo className=\"ml-3 size-8\" />\n              </a>\n              <div className=\"flex gap-2\">\n                <button\n                  onClick={() => setMenuState(!menuState)}\n                  aria-label={menuState == true ? \"Close Menu\" : \"Open Menu\"}\n                  className=\"relative z-20 block cursor-pointer p-2.5 pr-4 md:hidden\"\n                >\n                  <Equal className=\"m-auto scale-120 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-120 in-data-[state=active]:rotate-0 in-data-[state=active]:opacity-100\" />\n                </button>\n              </div>\n            </div>\n\n            <div className=\"absolute inset-0 m-auto hidden size-fit md:block\">\n              <Menus />\n            </div>\n\n            <div className=\"shadow-3xl hidden w-full flex-wrap items-center justify-end space-y-8 rounded-sm border p-3 shadow-border/20 backdrop-blur-2xl in-data-[state=active]:block md:m-0 md:flex md:w-fit md:flex-nowrap md:gap-6 md:space-y-0 md:border-transparent md:bg-transparent md:p-0 md:shadow-none md:in-data-[state=active]:flex dark:shadow-none dark:lg:bg-transparent\">\n              <div className=\"block p-3 md:hidden\">\n                <ul className=\"space-y-6 text-base\">\n                  {menuItems.map((item, index) => (\n                    <li key={index}>\n                      <a\n                        href={item.href}\n                        className=\"block text-sm text-muted-foreground duration-150 hover:text-primary\"\n                      >\n                        <span>{item.name}</span>\n                      </a>\n                    </li>\n                  ))}\n                </ul>\n              </div>\n              <div className=\"flex w-full flex-col space-y-3 sm:flex-row sm:gap-2 sm:space-y-0\">\n                <ModeToggle />\n                <Button\n                  nativeButton={false}\n                  className={cn(isScrolled && \"md:hidden\")}\n                  render={\n                    <a target=\"_blank\" href=\"https://cal.com/designali/30min\" />\n                  }\n                >\n                  <span>Book an Intro call</span>\n                </Button>\n              </div>\n            </div>\n          </div>\n        </div>\n      </nav>\n    </header>\n  )\n}\n\nexport { Header }\n",
      "type": "registry:component",
      "target": "components/header.tsx"
    },
    {
      "path": "registry/designali/blocks/header/header-01/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",
      "target": "components/theme-switch.tsx"
    },
    {
      "path": "registry/designali/blocks/header/header-01/components/menus.tsx",
      "content": "\"use client\"\n\nimport * as React from \"react\"\nimport Link from \"next/link\"\n\nimport {\n  ArrowUpRight as ArrowUpRightIcon,\n  Blocks as BlocksIcon,\n  CodeXml as Code2Icon,\n  Component as ComponentIcon,\n  SwatchBook as SwatchBookIcon,\n} from \"@designali/icons\"\n\nimport { cn } from \"@workspace/ui/lib/utils\"\n\nimport {\n  NavigationMenu,\n  NavigationMenuContent,\n  NavigationMenuItem,\n  NavigationMenuLink,\n  NavigationMenuList,\n  NavigationMenuTrigger,\n  navigationMenuTriggerStyle,\n} from \"@workspace/ui/components/navigation-menu\"\n\nconst designResources = [\n  {\n    title: \"UI Components\",\n    href: \"/ui\",\n    description:\n      \"Explore reusable and beautifully crafted interface components.\",\n  },\n  {\n    title: \"Blocks\",\n    href: \"/blocks\",\n    description:\n      \"Build complete sections and interfaces with flexible UI blocks.\",\n  },\n  {\n    title: \"Icons\",\n    href: \"/icons\",\n    description:\n      \"4000+ lucide-compatible icons from @designali/icons.\",\n  },\n  {\n    title: \"Design System\",\n    href: \"/docs\",\n    description:\n      \"Learn how Designali approaches scalable design systems.\",\n  },\n]\n\nconst developmentResources = [\n  {\n    title: \"Documentation\",\n    href: \"/docs\",\n    description:\n      \"Learn how to install, customize, and use Designali components.\",\n  },\n  {\n    title: \"Components\",\n    href: \"/docs/components\",\n    description:\n      \"Browse the component library and explore implementation details.\",\n  },\n  {\n    title: \"Templates\",\n    href: \"/templates\",\n    description:\n      \"Start your next project with production-ready templates.\",\n  },\n  {\n    title: \"GitHub\",\n    href: \"https://github.com/designali-com\",\n    description:\n      \"Explore the source code, components, and projects on GitHub.\",\n  },\n]\n\n\nexport function Menus() {\n  return (\n    <NavigationMenu>\n      <NavigationMenuList>\n        {/* Resources */}\n        <NavigationMenuItem>\n          <NavigationMenuTrigger>Resources</NavigationMenuTrigger>\n\n          <NavigationMenuContent>\n            <div className=\"grid w-[500px] grid-cols-2 gap-2 p-2\">\n              {designResources.map((item) => (\n                <ListItem\n                  key={item.title}\n                  title={item.title}\n                  href={item.href}\n                >\n                  {item.description}\n                </ListItem>\n              ))}\n            </div>\n          </NavigationMenuContent>\n        </NavigationMenuItem>\n\n        {/* Development */}\n        <NavigationMenuItem>\n          <NavigationMenuTrigger>Development</NavigationMenuTrigger>\n\n          <NavigationMenuContent>\n            <div className=\"grid w-[500px] grid-cols-2 gap-2 p-2\">\n              {developmentResources.map((item) => (\n                <ListItem\n                  key={item.title}\n                  title={item.title}\n                  href={item.href}\n                  external={item.href.startsWith(\"http\")}\n                >\n                  {item.description}\n                </ListItem>\n              ))}\n            </div>\n          </NavigationMenuContent>\n        </NavigationMenuItem>\n\n        {/* Components */}\n        <NavigationMenuItem className=\"hidden md:flex\">\n          <NavigationMenuTrigger>\n            Components\n          </NavigationMenuTrigger>\n\n          <NavigationMenuContent>\n            <div className=\"grid w-[500px] grid-cols-2 gap-2 p-2\">\n              <IconListItem\n                href=\"/ui\"\n                icon={<ComponentIcon />}\n                title=\"UI Components\"\n              >\n                Reusable components for modern web interfaces.\n              </IconListItem>\n\n              <IconListItem\n                href=\"/blocks\"\n                icon={<BlocksIcon />}\n                title=\"Blocks\"\n              >\n                Complete sections for landing pages and applications.\n              </IconListItem>\n\n              <IconListItem\n                href=\"/docs\"\n                icon={<Code2Icon />}\n                title=\"Developer Docs\"\n              >\n                Component APIs, installation, and implementation guides.\n              </IconListItem>\n\n              <IconListItem\n                href=\"/illustration\"\n                icon={<SwatchBookIcon />}\n                title=\"Illustrations\"\n              >\n                Abstract shapes and vectors from @designali/vectors.\n              </IconListItem>\n            </div>\n          </NavigationMenuContent>\n        </NavigationMenuItem>\n\n        {/* Quick Links */}\n        <NavigationMenuItem>\n          <NavigationMenuLink\n            className={navigationMenuTriggerStyle()}\n            render={<Link href=\"/pricing\">Pricing</Link>}\n          />\n        </NavigationMenuItem>\n\n        {/* Contact */}\n        <NavigationMenuItem>\n          <NavigationMenuLink\n            className={navigationMenuTriggerStyle()}\n            render={<Link href=\"/blogs\">Blogs</Link>}\n          />\n        </NavigationMenuItem>\n      </NavigationMenuList>\n    </NavigationMenu>\n  )\n}\n\nfunction ListItem({\n  title,\n  children,\n  href,\n  className,\n  external = false,\n  ...props\n}: React.ComponentPropsWithoutRef<\"li\"> & {\n  title: string\n  href: string\n  external?: boolean\n}) {\n  const linkProps = external\n    ? {\n      target: \"_blank\",\n      rel: \"noopener noreferrer\",\n    }\n    : {}\n\n  return (\n    <li\n      {...props}\n      className={cn(\n        \"list-none\",\n        className\n      )}\n    >\n      <NavigationMenuLink\n      className={\"text-start grid\"}\n        render={\n          <Link\n            href={href}\n            {...linkProps}\n            className=\"group block w-full rounded-lg p-3 text-left no-underline outline-none transition-colors hover:bg-accent focus:bg-accent\"\n          >\n            <div className=\"flex items-center justify-start gap-2\">\n              <span className=\"text-sm font-medium leading-none\">\n                {title}\n              </span>\n\n              {external && (\n                <ArrowUpRightIcon className=\"size-3.5 text-muted-foreground transition-transform group-hover:-translate-y-0.5 group-hover:translate-x-0.5\" />\n              )}\n            </div>\n\n            <p className=\"mt-1.5 line-clamp-2 text-left text-xs leading-relaxed text-muted-foreground\">\n              {children}\n            </p>\n          </Link>\n        }\n      />\n    </li>\n  )\n}\n\nfunction IconListItem({\n  title,\n  children,\n  href,\n  icon,\n  className,\n  ...props\n}: React.ComponentPropsWithoutRef<\"li\"> & {\n  title: string\n  href: string\n  icon: React.ReactNode\n}) {\n  return (\n    <li\n      {...props}\n      className={cn(\n        \"list-none\",\n        className\n      )}\n    >\n      <NavigationMenuLink\n        render={\n          <Link\n            href={href}\n            className=\"group flex items-start gap-3 rounded-lg p-3 no-underline outline-none transition-colors hover:bg-accent focus:bg-accent\"\n          >\n            <div className=\"flex size-9 shrink-0 items-center justify-center rounded-md border bg-background text-muted-foreground transition-colors group-hover:text-foreground\">\n              {React.isValidElement(icon)\n                ? React.cloneElement(\n                  icon as React.ReactElement<{\n                    className?: string\n                  }>,\n                  {\n                    className: \"size-4\",\n                  }\n                )\n                : icon}\n            </div>\n\n            <div className=\"min-w-0 flex flex-col\">\n              <div className=\"text-sm font-medium leading-none\">\n                {title}\n              </div>\n\n              <p className=\"mt-1.5 line-clamp-2 text-xs leading-relaxed text-muted-foreground\">\n                {children}\n              </p>\n            </div>\n          </Link>\n        }\n      />\n    </li>\n  )\n}",
      "type": "registry:component",
      "target": "components/menus.tsx"
    }
  ],
  "meta": {
    "iframeHeight": "500px"
  },
  "categories": [
    "header"
  ]
}