{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "title": "Button",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-react/components/button/Button.tsx",
      "content": "import * as React from 'react'\nimport { Slot } from '@radix-ui/react-slot'\nimport { cn } from '@/lib/utils'\nimport { buttonVariants, type ButtonVariants } from './button.variants'\n\nexport interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, ButtonVariants {\n  /** Render the child element as the button (merging props/styles) instead of\n   *  emitting a <button> — the React equivalent of reka-ui's as-child. Use it\n   *  to give a Next.js <Link> or <a> full button styling. */\n  asChild?: boolean\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n  ({ className, variant, size, asChild = false, ...props }, ref) => {\n    const Comp = asChild ? Slot : 'button'\n    return (\n      <Comp\n        data-uipkge=\"\"\n        data-slot=\"button\"\n        data-variant={variant ?? undefined}\n        data-size={size ?? undefined}\n        className={cn(buttonVariants({ variant, size }), className)}\n        ref={ref}\n        {...props}\n      />\n    )\n  },\n)\nButton.displayName = 'Button'\n\nexport { Button }\n",
      "type": "registry:ui",
      "target": "~/components/ui/button/Button.tsx"
    },
    {
      "path": "packages/registry-react/components/button/button.variants.ts",
      "content": "import type { VariantProps } from 'class-variance-authority'\nimport { cva } from 'class-variance-authority'\n\n/**\n * Variant definitions live in their own file (rather than the package\n * `index.ts`) so `Button.vue` can `import { buttonVariants } from\n * './button.variants'` without creating a circular dependency through the\n * index. See card.variants.ts for the same pattern + the SSR symptom that\n * motivated the split.\n */\nexport const buttonVariants = cva(\n  \"inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-[color,background-color,border-color,box-shadow,opacity,transform] duration-150 active:scale-[0.97] active:duration-100 touch-manipulation disabled:cursor-not-allowed disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive\",\n  {\n    variants: {\n      variant: {\n        default: 'bg-primary text-primary-foreground hover:bg-primary/90',\n        destructive:\n          'bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60',\n        outline:\n          'border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50',\n        secondary: 'bg-secondary text-secondary-foreground hover:bg-secondary/80',\n        ghost: 'hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50',\n        link: 'text-primary underline-offset-4 hover:underline',\n      },\n      size: {\n        default: 'h-9 px-4 py-2 has-[>svg]:px-3',\n        sm: 'h-8 rounded-md gap-1.5 px-3 has-[>svg]:px-2.5',\n        lg: 'h-10 rounded-md px-6 has-[>svg]:px-4',\n        xs: 'h-7 rounded-md gap-1 px-2 has-[>svg]:px-1.5 text-xs',\n        icon: 'size-9',\n        'icon-sm': 'size-8',\n        'icon-lg': 'size-10',\n      },\n    },\n    defaultVariants: {\n      variant: 'default',\n      size: 'default',\n    },\n  },\n)\n\nexport type ButtonVariants = VariantProps<typeof buttonVariants>\n",
      "type": "registry:ui",
      "target": "~/components/ui/button/button.variants.ts"
    },
    {
      "path": "packages/registry-react/components/button/index.ts",
      "content": "export { Button, type ButtonProps } from './Button'\nexport { buttonVariants, type ButtonVariants } from './button.variants'\n",
      "type": "registry:ui",
      "target": "~/components/ui/button/index.ts"
    }
  ],
  "dependencies": [
    "class-variance-authority",
    "@radix-ui/react-slot"
  ],
  "devDependencies": [],
  "registryDependencies": [],
  "description": "The primary clickable primitive — six variants (default, destructive, outline, secondary, ghost, link), seven sizes (default, sm, lg, xs, icon, icon-sm, icon-lg), and an as-child mode that lets you render a Link or anchor with full button styling.",
  "categories": [
    "control"
  ]
}