{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "homepage-hero",
  "title": "Homepage Hero",
  "author": "AlgorizeTech",
  "description": "Ask the user to pick one of 16 hero variants: https://avaraui.com/view/hero. This item is not one of them but is also a hero, so ask before installing it. Skip the question if the user already named it. A feature-rich hero section with animated typing text, interactive CLI copy badge, gradient action buttons, and feature list.",
  "dependencies": [
    "lucide-react"
  ],
  "registryDependencies": [
    "https://avaraui.com/r/animated-typography.json",
    "utils"
  ],
  "files": [
    {
      "path": "src/components/custom/blocks/HomepageHeroBlock.tsx",
      "content": "\"use client\";\n\nimport React, { forwardRef, useState } from \"react\";\nimport { cn } from \"@/lib/utils\";\nimport { AnimatedTypographyBlock, type PrefixPosition } from \"./AnimatedTypographyBlock\";\nimport { ArrowRight, Check, Copy, Sparkles, Terminal } from \"lucide-react\";\n\nconst GitHubIcon = (props: React.SVGProps<SVGSVGElement>) => (\n  <svg\n    viewBox=\"0 0 24 24\"\n    fill=\"currentColor\"\n    aria-hidden=\"true\"\n    {...props}\n  >\n    <path\n      fillRule=\"evenodd\"\n      clipRule=\"evenodd\"\n      d=\"M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.53 1.032 1.53 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0112 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0022 12.017C22 6.484 17.522 2 12 2z\"\n    />\n  </svg>\n);\n\nexport interface HomepageHeroBlockProps extends React.HTMLAttributes<HTMLElement> {\n  badgeText?: string;\n  badgeHref?: string;\n  titlePrefix?: string;\n  typingWords?: string[];\n  titleSuffix?: string;\n  /**\n   * Whether the title text before the flipping word holds still (\"fixed\",\n   * the default) or re-centres as the word changes width (\"fluid\").\n   */\n  prefixPosition?: PrefixPosition;\n  subtitle?: string;\n  cliCommand?: string;\n  linkComponent?: React.ElementType;\n  primaryActionLabel?: string;\n  primaryActionHref?: string;\n  secondaryActionLabel?: string;\n  secondaryActionHref?: string;\n}\n\nexport const HomepageHeroBlock = forwardRef<HTMLElement, HomepageHeroBlockProps>(\n  (\n    {\n      linkComponent: Link = \"a\",\n      badgeText = \"Next-Gen React Components\",\n      badgeHref = \"#\",\n      titlePrefix = \"Build \",\n      typingWords = [\n        \"Interfaces\",\n        \"Components\",\n        \"Experiences\",\n        \"Animations\",\n        \"Dashboards\",\n      ],\n      titleSuffix = \"\",\n      prefixPosition,\n      subtitle = \"A meticulous library of React components & interactive blocks, engineered for seamless performance with Tailwind CSS, TypeScript, GSAP, and Motion.\",\n      cliCommand = \"npx shadcn@latest add @avara-ui/button\",\n      primaryActionLabel = \"Browse Components\",\n      primaryActionHref = \"#\",\n      secondaryActionLabel = \"Star on GitHub\",\n      secondaryActionHref = \"#\",\n      className,\n      ...props\n    },\n    ref,\n  ) => {\n    const [copied, setCopied] = useState(false);\n    const handleCopy = () => {\n      if (typeof window !== \"undefined\" && navigator.clipboard) {\n        navigator.clipboard.writeText(cliCommand);\n        setCopied(true);\n        setTimeout(() => setCopied(false), 2000);\n      }\n    };\n\n    return (\n      <section\n        ref={ref}\n        className={cn(\n          \"relative w-full flex flex-col justify-center items-center py-4 sm:py-8 md:py-12\",\n          className,\n        )}\n        {...props}\n      >\n        {/* Radial Background Glow */}\n        <div\n          className=\"absolute inset-0 pointer-events-none\"\n          style={{\n            background:\n              \"radial-gradient(ellipse 80% 60% at 50% -10%, var(--primary) 0%, transparent 65%)\",\n            opacity: 0.12,\n          }}\n        />\n        {/* Grid Mask Background */}\n        <div className=\"absolute inset-0 bg-[linear-gradient(to_right,color-mix(in_oklab,var(--foreground)_3%,transparent)_1px,transparent_1px),linear-gradient(to_bottom,color-mix(in_oklab,var(--foreground)_3%,transparent)_1px,transparent_1px)] bg-[size:24px_24px] sm:bg-[size:36px_36px] [mask-image:radial-gradient(ellipse_70%_60%_at_50%_40%,black_40%,transparent_100%)]\" />\n\n        <div className=\"relative z-10 max-w-[1320px] mx-auto w-full px-5 sm:px-6 md:px-8 flex flex-col justify-center items-center\">\n          <div className=\"flex flex-col items-center text-center max-w-[1320px] mx-auto space-y-3.5 sm:space-y-6 md:space-y-7 my-auto\">\n            {/* Top Pill Badge */}\n            {badgeText && (\n              <Link href={badgeHref} className=\"inline-block group\">\n                <div className=\"inline-flex items-center gap-1 sm:gap-2 px-2.5 sm:px-3 py-1 sm:py-1.5 rounded-full bg-primary/10 border border-primary/30 text-[9px] xs:text-[10px] sm:text-xs font-semibold text-primary group-hover:bg-primary/20 group-hover:border-primary/50 transition-all duration-300\">\n                  <Sparkles className=\"size-2.5 xs:size-3 sm:size-4 text-primary animate-spin shrink-0\" />\n                  <span className=\"truncate max-w-[140px] xs:max-w-[170px] sm:max-w-none\">\n                    {badgeText}\n                  </span>\n                </div>\n              </Link>\n            )}\n\n            {/* Dynamic Animated Title Word (Vertical Text Slide / Word Flip) */}\n            <h1 className=\"text-xl xs:text-2xl sm:text-2xl md:text-3xl lg:text-5xl xl:text-7xl font-medium tracking-tight leading-tight text-foreground text-center inline-flex items-center justify-center flex-wrap\">\n              <span className=\"shrink-0 mr-2\">\n                {titlePrefix}\n                <span className=\"text-primary\">Interactive</span>\n              </span>\n\n              <AnimatedTypographyBlock\n                as=\"span\"\n                bare\n                variant=\"word-flip\"\n                words={typingWords}\n                prefixPosition={prefixPosition}\n                className=\"shrink-0 text-foreground font-medium\"\n              />\n\n              {titleSuffix && <span className=\"shrink-0\">{titleSuffix}</span>}\n            </h1>\n\n            {/* Subtitle Paragraph */}\n            {subtitle && (\n              <p className=\"text-[10px] xs:text-xs sm:text-base md:text-lg text-muted-foreground w-full max-w-3xl mx-auto leading-tight sm:leading-relaxed text-center font-medium px-1 sm:px-0\">\n                {subtitle}\n              </p>\n            )}\n\n            {/* CLI Command Box */}\n            {cliCommand && (\n              <div className=\"pt-0.5 w-full flex justify-center px-1 sm:px-0\">\n                <button\n                  type=\"button\"\n                  onClick={handleCopy}\n                  className=\"group flex items-center gap-2 sm:gap-3.5 px-2.5 sm:px-5 h-8 xs:h-9 sm:h-[58px] rounded-lg sm:rounded-2xl border border-border bg-muted/70 cursor-pointer w-full max-w-[220px] xs:max-w-[250px] sm:max-w-md hover:border-primary/50 transition-all\"\n                >\n                  <Terminal className=\"size-3 xs:size-3.5 sm:size-5 text-primary shrink-0\" />\n                  <code className=\"text-[9px] xs:text-[10px] sm:text-sm md:text-base font-mono text-foreground flex-1 text-left font-semibold truncate !bg-transparent !border-none !outline-none !shadow-none !p-0\">\n                    {cliCommand}\n                  </code>\n                  <div className=\"pl-1.5 sm:pl-3.5 border-l-0 h-3 sm:h-5 flex items-center shrink-0\">\n                    {copied ? (\n                      <Check className=\"size-3 sm:size-4.5 text-emerald-500\" />\n                    ) : (\n                      <Copy className=\"size-3 sm:size-4.5 text-muted-foreground group-hover:text-foreground transition-colors\" />\n                    )}\n                  </div>\n                </button>\n              </div>\n            )}\n\n            {/* Actions */}\n            <div className=\"flex flex-row items-center justify-center gap-1.5 xs:gap-2.5 sm:gap-4 pt-0 sm:pt-2 w-full max-w-3xl mx-auto px-1 sm:px-0\">\n              {primaryActionLabel && (\n                <Link\n                  href={primaryActionHref}\n                  className=\"px-2.5 xs:px-3 sm:px-9 h-8 xs:h-9 sm:h-[58px] rounded-lg sm:rounded-2xl bg-primary text-primary-foreground text-[10px] xs:text-xs sm:text-base md:text-lg font-semibold hover:opacity-90 hover:scale-[1.02] active:scale-[0.98] transition-all flex items-center justify-center gap-1 sm:gap-2.5 flex-1 sm:flex-initial min-w-0 sm:min-w-[220px]\"\n                >\n                  <span>{primaryActionLabel}</span>\n                  <ArrowRight className=\"size-3 sm:size-5 shrink-0\" />\n                </Link>\n              )}\n\n              {secondaryActionLabel && (\n                <Link\n                  href={secondaryActionHref}\n                  target={\n                    secondaryActionHref.startsWith(\"http\")\n                      ? \"_blank\"\n                      : undefined\n                  }\n                  className=\"px-2.5 xs:px-3 sm:px-9 h-8 xs:h-9 sm:h-[58px] rounded-lg sm:rounded-2xl border border-border bg-card text-foreground text-[10px] xs:text-xs sm:text-base md:text-lg font-semibold hover:bg-primary/10 hover:border-primary/50 hover:text-primary hover:scale-[1.02] active:scale-[0.98] transition-all flex items-center justify-center gap-1 sm:gap-2.5 flex-1 sm:flex-initial min-w-0 sm:min-w-[220px]\"\n                >\n                  <span>{secondaryActionLabel}</span>\n                  <GitHubIcon className=\"size-3 sm:size-5 shrink-0\" />\n                </Link>\n              )}\n            </div>\n          </div>\n        </div>\n      </section>\n    );\n  },\n);\n\nHomepageHeroBlock.displayName = \"HomepageHeroBlock\";\nexport default HomepageHeroBlock;\n",
      "type": "registry:component",
      "target": "components/custom/blocks/HomepageHeroBlock.tsx"
    }
  ],
  "categories": [
    "marketing",
    "layout"
  ],
  "type": "registry:component"
}
