{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "title": "Label",
  "description": "Accessible form label built on radix-ui Label with 2 sizes (sm, md). Auto-dims when the associated control is disabled.",
  "dependencies": [
    "radix-ui@^1.6.1"
  ],
  "registryDependencies": [
    "@ai2/tokens",
    "@ai2/primitives"
  ],
  "files": [
    {
      "path": "registry/ai2/ui/label.tsx",
      "content": "\"use client\"\n\nimport type * as React from \"react\"\nimport { Label as LabelPrimitive } from \"@/registry/ai2/ui/primitives\"\n\nimport { cn } from \"@/lib/utils\"\n\ninterface LabelProps\n  extends React.ComponentProps<typeof LabelPrimitive.Root> {\n  size?: \"sm\" | \"md\"\n}\n\nfunction Label({ className, size = \"md\", ...props }: LabelProps) {\n  return (\n    <LabelPrimitive.Root\n      data-slot=\"label\"\n      data-size={size}\n      className={cn(\n        \"flex items-center gap-2 font-medium leading-none select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50\",\n        size === \"sm\" ? \"text-xs\" : \"text-sm\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Label, type LabelProps }\n",
      "type": "registry:ui"
    }
  ],
  "docs": "Pair with any form control via htmlFor. Handles peer-disabled and group-data-disabled dimming automatically.",
  "categories": [
    "form"
  ],
  "type": "registry:ui"
}