{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "title": "Button",
  "description": "A Destiny FUI button: flat, square, tracked-uppercase, with an offset outline ring that fades in on hover and a rhythmic fill pulse.",
  "dependencies": [
    "@radix-ui/react-slot",
    "class-variance-authority"
  ],
  "registryDependencies": [
    "@engram/cn",
    "@engram/tokens"
  ],
  "files": [
    {
      "path": "src/components/button.tsx",
      "content": "import { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport type { ButtonHTMLAttributes } from \"react\";\nimport { cn } from \"../lib/cn.js\";\n\n// D2 buttons: flat, square, tracked-uppercase. On hover an offset outline ring\n// appears (no layout shift — the ring is always present but transparent) and the\n// fill brightens rhythmically. Active nudges down a pixel.\nconst button = cva(\n  \"inline-flex items-center justify-center gap-2 whitespace-nowrap border font-engram-display font-semibold uppercase tracking-[0.14em] outline outline-1 outline-transparent outline-offset-4 transition-colors active:translate-y-px focus-visible:outline-engram-accent disabled:pointer-events-none disabled:opacity-45\",\n  {\n    variants: {\n      variant: {\n        primary:\n          \"border-engram-accent bg-engram-accent text-engram-bg hover:bg-engram-accent-2 hover:outline-engram-accent hover:[animation:engram-btn-pulse_1.1s_ease-in-out_infinite]\",\n        gold: \"border-engram-gold bg-transparent text-engram-gold hover:outline-engram-gold hover:[animation:engram-btn-pulse_1.1s_ease-in-out_infinite]\",\n        launch:\n          \"border-[#5cbf61] bg-[#3f9447] text-[#eef7ef] hover:bg-[#4cae54] hover:outline-white/60 hover:[animation:engram-btn-pulse_1.1s_ease-in-out_infinite]\",\n        outline:\n          \"border-engram-border-strong bg-transparent text-engram-fg hover:border-engram-fg/50 hover:outline-engram-fg/40 hover:[animation:engram-btn-pulse_1.1s_ease-in-out_infinite]\",\n        ghost:\n          \"border-transparent bg-transparent text-engram-muted hover:text-engram-fg\",\n      },\n      size: {\n        sm: \"h-7 px-3.5 text-xs\",\n        md: \"h-9 px-5 text-[13px]\",\n        lg: \"h-11 px-6 text-sm\",\n      },\n    },\n    defaultVariants: {\n      variant: \"primary\",\n      size: \"md\",\n    },\n  },\n);\n\nexport interface ButtonProps\n  extends ButtonHTMLAttributes<HTMLButtonElement>,\n    VariantProps<typeof button> {\n  /** Render as the child element (Radix Slot), e.g. to wrap a Next.js Link. */\n  asChild?: boolean;\n}\n\n/**\n * A Destiny FUI button: flat, square, tracked-uppercase, with an offset outline\n * ring that fades in on hover and a rhythmic fill pulse. Variants cover primary,\n * gold, launch, outline, and ghost; `asChild` renders as a wrapped element.\n */\nexport function Button({\n  className,\n  variant,\n  size,\n  asChild = false,\n  ...props\n}: ButtonProps) {\n  const Comp = asChild ? Slot : \"button\";\n  return (\n    <Comp className={cn(button({ variant, size }), className)} {...props} />\n  );\n}\n",
      "type": "registry:component",
      "target": "components/engram/button.tsx"
    }
  ],
  "meta": {
    "level": "atom"
  },
  "docs": "Extend without forking: edit the copied source, use `asChild` (Radix Slot) to change the rendered element, pass the typed `annotations` prop for curated data (verdict/tags/per-plug), or use slot / render-prop props for arbitrary content. Requires the @engram/tokens theme (--engram-* CSS variables).",
  "categories": [
    "primitive"
  ],
  "type": "registry:component"
}