{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"shadcnblocks/aurora-button","title":"Aurora Button - Aurora gradient button","description":"A button filled with a slowly shifting multi-color aurora gradient, or an aurora outline with a solid inner fill.","dependencies":["radix-ui","cn"],"registryDependencies":["button"],"files":[{"path":"components/shadcnblocks/aurora-button.tsx","content":"import { Slot } from \"radix-ui\";\nimport { cn } from \"cn\";\n\nimport { buttonVariants } from \"@/components/ui/button\";\ntype AuroraButtonVariant = \"default\" | \"secondary\" | \"outline\";\n\nconst auroraGradient =\n  \"linear-gradient(115deg, var(--chart-1), var(--chart-2), var(--chart-3), var(--chart-4), var(--chart-5), var(--chart-1))\";\n\nexport interface AuroraButtonProps\n  extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n  variant?: AuroraButtonVariant;\n  asChild?: boolean;\n}\n\nexport const AuroraButton = ({\n  children,\n  variant = \"default\",\n  asChild = false,\n  className,\n  ...props\n}: AuroraButtonProps) => {\n  const Comp = asChild ? Slot.Root : \"button\";\n  const isOutline = variant === \"outline\";\n\n  return (\n    <Comp\n      type={asChild ? undefined : \"button\"}\n      className={cn(\n        buttonVariants({ variant, size: \"default\" }),\n        \"relative overflow-hidden\",\n        !isOutline && \"border-transparent bg-transparent text-primary-foreground\",\n        className,\n      )}\n      {...props}\n    >\n      {!isOutline && (\n        <span\n          className=\"absolute inset-0 animate-[aurora-flow_8s_ease-in-out_infinite]\"\n          style={{\n            background: auroraGradient,\n            backgroundSize: \"300% 300%\",\n          }}\n        />\n      )}\n\n      {isOutline && (\n        <>\n          <span\n            className=\"absolute inset-0 animate-[aurora-flow_8s_ease-in-out_infinite] opacity-80\"\n            style={{\n              background: auroraGradient,\n              backgroundSize: \"300% 300%\",\n            }}\n          />\n          <span className=\"absolute inset-px rounded-[calc(0.375rem-1px)] bg-background\" />\n        </>\n      )}\n\n      <span className=\"relative z-10 flex items-center gap-2\">{children}</span>\n\n      <style>{`\n        @keyframes aurora-flow {\n          0%, 100% { background-position: 0% 50%; }\n          50% { background-position: 100% 50%; }\n        }\n      `}</style>\n    </Comp>\n  );\n};\n","type":"registry:component"}],"type":"registry:component","meta":{"license":"https://www.shadcnblocks.com/license"}}