{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "buttons-gradient",
  "title": "Gradient buttons",
  "description": "Styled buttons: the Gradient set. 5 decorative buttons variations (FlowButton, ConicButton, DuotoneButton, AuroraButton, SunsetButton) on the ai2 token system, powered by framer-motion, reduced-motion aware and sized sm to xl. Part of the free styled layer.",
  "dependencies": [
    "motion@^12.42.2"
  ],
  "registryDependencies": [
    "@ai2/tokens"
  ],
  "files": [
    {
      "path": "registry/ai2/styled/buttons-gradient.tsx",
      "content": "\"use client\"\n\nimport type * as React from \"react\"\nimport { motion, useReducedMotion, type HTMLMotionProps } from \"motion/react\"\n\nimport { cn } from \"@/lib/utils\"\n\n/* Gradient button family: 5 variations built from token gradients. All are sized, use framer-motion, take colour ONLY from semantic tokens (the gradient stops through var(--token) and color-mix) and are reduced-motion safe. The text is the dominant token's foreground. */\n\nexport type StyledSize = \"sm\" | \"md\" | \"lg\" | \"xl\"\n\nconst sizes: Record<StyledSize, string> = {\n  sm: \"h-8 gap-1.5 rounded-md px-3 text-sm\",\n  md: \"h-9 gap-2 rounded-lg px-4 text-sm\",\n  lg: \"h-10 gap-2 rounded-lg px-5 text-sm\",\n  xl: \"h-12 gap-2.5 rounded-xl px-6 text-base\",\n}\n\nconst base =\n  \"relative inline-flex shrink-0 select-none items-center justify-center overflow-hidden font-medium whitespace-nowrap outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0 [&_i]:text-base [&_i]:leading-none\"\n\ntype Props = HTMLMotionProps<\"button\"> & { size?: StyledSize }\n\n/* Flow: info -> brand gradyan yatay akar (backgroundPosition). */\nexport function FlowButton({ className, size = \"md\", children, ...props }: Props) {\n  const reduce = useReducedMotion()\n  return (\n    <motion.button\n      data-slot=\"styled-button\"\n      animate={reduce ? undefined : { backgroundPosition: [\"0% center\", \"200% center\"] }}\n      transition={reduce ? undefined : { duration: 3.5, ease: \"linear\", repeat: Infinity }}\n      whileHover={reduce ? undefined : { scale: 1.03 }}\n      whileTap={reduce ? undefined : { scale: 0.97 }}\n      className={cn(\n        base,\n        sizes[size],\n        \"text-info-foreground [background-image:linear-gradient(90deg,var(--info),color-mix(in_oklab,var(--info)_55%,var(--brand)),var(--info))] [background-size:200%_auto]\",\n        className\n      )}\n      {...props}\n    >\n      {children}\n    </motion.button>\n  )\n}\n\n/* Conic: a rotating conic token gradient behind, with the text on top. */\nexport function ConicButton({ className, size = \"md\", children, ...props }: Props) {\n  const reduce = useReducedMotion()\n  return (\n    <motion.button\n      data-slot=\"styled-button\"\n      whileHover={reduce ? undefined : { scale: 1.03 }}\n      whileTap={reduce ? undefined : { scale: 0.97 }}\n      transition={{ type: \"spring\", stiffness: 400, damping: 20 }}\n      className={cn(base, sizes[size], \"bg-info text-info-foreground\", className)}\n      {...props}\n    >\n      <motion.span\n        aria-hidden=\"true\"\n        className=\"pointer-events-none absolute inset-[-60%]\"\n        style={{\n          background:\n            \"conic-gradient(from 0deg, var(--info), var(--brand), var(--success), var(--info))\",\n        }}\n        animate={reduce ? undefined : { rotate: 360 }}\n        transition={reduce ? undefined : { duration: 5, ease: \"linear\", repeat: Infinity }}\n      />\n      <span className=\"relative flex items-center gap-2\">{children as React.ReactNode}</span>\n    </motion.button>\n  )\n}\n\n/* Duotone: iki token arasi capraz statik gradyan. */\nexport function DuotoneButton({ className, size = \"md\", children, ...props }: Props) {\n  const reduce = useReducedMotion()\n  return (\n    <motion.button\n      data-slot=\"styled-button\"\n      whileHover={reduce ? undefined : { scale: 1.03 }}\n      whileTap={reduce ? undefined : { scale: 0.97 }}\n      transition={{ type: \"spring\", stiffness: 400, damping: 20 }}\n      className={cn(\n        base,\n        sizes[size],\n        \"text-info-foreground [background-image:linear-gradient(135deg,var(--info),var(--brand))]\",\n        className\n      )}\n      {...props}\n    >\n      {children}\n    </motion.button>\n  )\n}\n\n/* Aurora: cok tonlu (success/info/brand) yumusak gradyan yavasca kayar. */\nexport function AuroraButton({ className, size = \"md\", children, ...props }: Props) {\n  const reduce = useReducedMotion()\n  return (\n    <motion.button\n      data-slot=\"styled-button\"\n      animate={reduce ? undefined : { backgroundPosition: [\"0% 50%\", \"100% 50%\", \"0% 50%\"] }}\n      transition={reduce ? undefined : { duration: 6, ease: \"easeInOut\", repeat: Infinity }}\n      whileHover={reduce ? undefined : { scale: 1.03 }}\n      whileTap={reduce ? undefined : { scale: 0.97 }}\n      className={cn(\n        base,\n        sizes[size],\n        \"text-info-foreground [background-image:linear-gradient(110deg,var(--success),var(--info),var(--brand),var(--info),var(--success))] [background-size:300%_100%]\",\n        className\n      )}\n      {...props}\n    >\n      {children}\n    </motion.button>\n  )\n}\n\n/* Sunset: sicak token gradyani (warning -> danger), statik. */\nexport function SunsetButton({ className, size = \"md\", children, ...props }: Props) {\n  const reduce = useReducedMotion()\n  return (\n    <motion.button\n      data-slot=\"styled-button\"\n      whileHover={reduce ? undefined : { scale: 1.03 }}\n      whileTap={reduce ? undefined : { scale: 0.97 }}\n      transition={{ type: \"spring\", stiffness: 400, damping: 20 }}\n      className={cn(\n        base,\n        sizes[size],\n        \"text-danger-foreground [background-image:linear-gradient(135deg,var(--warning),var(--danger))]\",\n        className\n      )}\n      {...props}\n    >\n      {children}\n    </motion.button>\n  )\n}\n",
      "type": "registry:component",
      "target": "components/ui/buttons-gradient.tsx"
    }
  ],
  "categories": [
    "styled",
    "buttons"
  ],
  "type": "registry:component"
}