{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "button",
  "type": "registry:ui",
  "title": "Button",
  "description": "@interlace/ui — button primitive (shadcn-compatible).",
  "dependencies": [
    "@base-ui-components/react",
    "class-variance-authority"
  ],
  "registryDependencies": [],
  "files": [
    {
      "path": "registry/interlace-ui/button.tsx",
      "target": "components/ui/button.tsx",
      "type": "registry:ui",
      "content": "'use client';\n\n/**\n * @interlace/ui — Button (secondary reference for the interlace-component skill)\n *\n * The minimal-surface counterpart to [dialog.tsx](./dialog.tsx). Where Dialog\n * exercises compound composition + portal + focus, Button exercises the\n * variant + render-prop polymorphism + native-event passthrough surface.\n *\n * | Rule | Concept                          | Where in this file                                                          |\n * | ---- | -------------------------------- | --------------------------------------------------------------------------- |\n * | R4   | Extends native el + VariantProps | `React.ComponentProps<'button'> & VariantProps<typeof buttonVariants>`      |\n * | R7   | className merged + ...rest + ref | `cn(buttonVariants({ ... }), className)` + `{...props}` + `useRender`        |\n * | R8   | No `isXxx` prefix                | All variant keys (`variant`, `size`) follow MUI naming, not `isXxx`         |\n * | R9   | Native onClick stays native      | `onClick` passes through `{...props}` — never wrapped in a bespoke name     |\n * | R12  | Reuse over wrap                  | The `render` prop lets consumers replace the rendered element entirely      |\n * | R13  | Ecosystem first                  | `useRender` from `@base-ui-components/react/use-render` owns slot rendering |\n * | R17  | API parity                       | Mirrors shadcn/ui Button + Base UI's `useRender` slot — no deviation        |\n * | R18  | Tailwind only                    | Zero inline `style={{}}`; all visual classes come from `buttonVariants`     |\n * | R19  | Tokens only                      | `buttonVariants` lives in [button-variants.ts](./button-variants.ts) and uses theme tokens |\n * | R20  | AA contrast                      | Variant classes target `bg-primary`/`text-primary-foreground` — token pair  |\n * | R26  | A11y from native el              | `<button>` is the native element; focus, keyboard, ARIA inherited           |\n *\n * Out of scope: this primitive does not own `data-testid` / `data-slot` defaults\n * (R5 / R6) — those are consumer-supplied and live one level up in the\n * compound parent (`<MyButton data-testid=\"submit\" data-slot=\"form-submit\">`).\n */\n\nimport * as React from 'react';\nimport { useRender } from '@base-ui-components/react/use-render';\nimport type { VariantProps } from 'class-variance-authority';\n\nimport { cn } from '../lib/cn.js';\nimport { buttonVariants } from './button-variants.js';\n\ntype ButtonProps = React.ComponentProps<'button'> &\n  VariantProps<typeof buttonVariants> & {\n    /**\n     * Replace the rendered element. Equivalent to shadcn's legacy `asChild`.\n     * Pass a `ReactElement` (e.g. `<Link href=\"...\">`) or a render function.\n     */\n    render?: useRender.RenderProp;\n  };\n\nfunction Button({\n  className,\n  variant = 'default',\n  size = 'default',\n  render,\n  ...props\n}: ButtonProps) {\n  const element = useRender({\n    render: render ?? <button />,\n    props: {\n      'data-slot': 'button',\n      'data-variant': variant ?? undefined,\n      'data-size': size ?? undefined,\n      className: cn(buttonVariants({ variant, size, className })),\n      ...props,\n    },\n  });\n\n  return element;\n}\n\nexport { Button, buttonVariants };\nexport type { ButtonProps };\n"
    }
  ]
}
