{"$schema":"https://ui.logic2b.com/schema/registry-item.json","name":"button","type":"registry:ui","description":"Displays a button or a component that looks like a button. Variants: default, destructive, outline, secondary, ghost, link. Sizes: default, sm, lg, icon.","dependencies":["radix-ui","class-variance-authority"],"registryDependencies":["utils"],"files":[{"path":"ui/button.tsx","type":"registry:ui","content":"import * as React from \"react\"\nimport { Slot } from \"radix-ui\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@/lib/utils\"\n\nconst buttonVariants = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none 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]\",\n  {\n    variants: {\n      variant: {\n        default:\n          \"bg-primary text-primary-foreground shadow-xs hover:bg-primary/90\",\n        destructive:\n          \"bg-destructive text-destructive-foreground shadow-xs hover:bg-destructive/90\",\n        outline:\n          \"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground\",\n        secondary:\n          \"bg-secondary text-secondary-foreground shadow-xs hover:bg-secondary/80\",\n        ghost: \"hover:bg-accent hover:text-accent-foreground\",\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        icon: \"size-9\",\n      },\n    },\n    defaultVariants: {\n      variant: \"default\",\n      size: \"default\",\n    },\n  }\n)\n\nfunction Button({\n  className,\n  variant,\n  size,\n  asChild = false,\n  ...props\n}: React.ComponentProps<\"button\"> &\n  VariantProps<typeof buttonVariants> & {\n    asChild?: boolean\n  }) {\n  const Comp = asChild ? Slot.Root : \"button\"\n\n  return (\n    <Comp\n      data-slot=\"button\"\n      className={cn(buttonVariants({ variant, size, className }))}\n      {...props}\n    />\n  )\n}\n\nexport { Button, buttonVariants }\n"}],"categories":["form"],"accessibility":{"support":"native","pattern":"button","primitive":"HTMLButtonElement","keyboard":[{"keys":["Enter","Space"],"action":"Activate the focused control."}],"aria":["Uses native button semantics unless asChild changes the rendered element."],"consumer":["Keep a visible label or provide aria-label for icon-only actions."]},"api":{"source":"src/ui/button.tsx","exports":[{"name":"Button","kind":"component","propsType":"React.ComponentProps<\"button\"> & VariantProps<typeof buttonVariants> & { asChild?: boolean }","props":[{"name":"variant","type":"null | \"link\" | \"default\" | \"destructive\" | \"secondary\" | \"outline\" | \"ghost\"","required":false},{"name":"size","type":"null | \"default\" | \"sm\" | \"lg\" | \"icon\"","required":false},{"name":"asChild","type":"boolean","required":false,"default":"false"}]},{"name":"buttonVariants","kind":"utility","signature":"(props?: (ConfigVariants<{ variant: { default: string; destructive: string; outline: string; secondary: string; ghost: string; link: string; }; size: { default: string; sm: string; lg: string; icon: string; }; }> & ClassProp) | undefined): string"}]}}