{ "$schema": "https://ui.shadcn.com/schema/registry-item.json", "name": "button", "title": "Button", "description": "Terminal-style button: filled by default, outline variant for borders, lighter on press, no hover/radius/shadow. Variants: default, primary, destructive, outline, ghost.", "dependencies": [ "class-variance-authority", "@radix-ui/react-slot" ], "registryDependencies": [ "utils", "theme-catppuccin-mocha", "font-jetbrains-mono" ], "files": [ { "path": "registry/ui/button.tsx", "content": "import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { cn } from \"@/lib/utils\";\n\nconst buttonVariants = cva(\n\t\"inline-flex items-center justify-center gap-2 whitespace-nowrap select-none font-mono outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:bg-muted disabled:text-foreground2 disabled:border-transparent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0\",\n\t{\n\t\tvariants: {\n\t\t\tvariant: {\n\t\t\t\tdefault:\n\t\t\t\t\t\"bg-muted text-foreground active:bg-background3\",\n\t\t\t\tprimary:\n\t\t\t\t\t\"bg-primary text-primary-foreground active:brightness-110\",\n\t\t\t\tdestructive:\n\t\t\t\t\t\"bg-destructive text-destructive-foreground active:brightness-110\",\n\t\t\t\toutline:\n\t\t\t\t\t\"border border-border bg-transparent text-foreground active:bg-muted\",\n\t\t\t\tghost:\n\t\t\t\t\t\"bg-transparent text-foreground1 active:bg-muted active:text-foreground\",\n\t\t\t},\n\t\t\tsize: {\n\t\t\t\tdefault: \"px-3 py-1 text-sm\",\n\t\t\t\tsm: \"px-2 py-0.5 text-xs\",\n\t\t\t\ticon: \"size-7\",\n\t\t\t},\n\t\t\tbracket: {\n\t\t\t\ttrue: \"before:content-['['] after:content-[']'] before:mr-1.5 after:ml-1.5\",\n\t\t\t\tfalse: \"\",\n\t\t\t},\n\t\t},\n\t\tdefaultVariants: { variant: \"default\", size: \"default\", bracket: false },\n\t},\n);\n\ninterface ButtonProps\n\textends React.ComponentProps<\"button\">,\n\t\tVariantProps {\n\tasChild?: boolean;\n}\n\nfunction Button({\n\tclassName,\n\tvariant,\n\tsize,\n\tbracket,\n\tasChild = false,\n\t...props\n}: ButtonProps) {\n\tconst Comp = asChild ? Slot : \"button\";\n\treturn (\n\t\t\n\t);\n}\n\nexport { Button, buttonVariants };\n", "type": "registry:ui" } ], "type": "registry:ui" }