{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "title": "Label",
  "author": "@fma-ui/ui",
  "description": "A form field label. Pair it with a control via id/htmlFor rather than passing label text as the control's own children — several toggle-style primitives (Checkbox, Switch, RadioGroupItem) render their children inside a small fixed-size box meant for a custom indicator, not prose.",
  "dependencies": [
    "cn@^0.4.0",
    "react-aria-components@^1.21.1"
  ],
  "files": [
    {
      "path": "src/core/label/label.tsx",
      "content": "import { cn } from \"cn\";\nimport { LabelContext, Label as LabelPrimitive, type LabelProps } from \"react-aria-components\";\n\nfunction Label({ className, htmlFor, slot, ...props }: LabelProps) {\n  const label = (\n    <LabelPrimitive\n      data-slot=\"label\"\n      className={cn(\n        \"flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50 peer-data-disabled:opacity-50\",\n        className,\n      )}\n      {...props}\n      htmlFor={htmlFor}\n      slot={slot}\n    />\n  );\n\n  if (htmlFor && slot === undefined) {\n    return <LabelContext.Provider value={null}>{label}</LabelContext.Provider>;\n  }\n\n  return label;\n}\n\nexport { Label };\n",
      "type": "registry:component",
      "target": "components/fma-ui/label.tsx"
    }
  ],
  "meta": {
    "status": "stable",
    "source": "shadcn",
    "origin": "shadcn/ui, style: aria-nova (base: react-aria-components)",
    "tags": [
      "forms",
      "label",
      "react-aria"
    ]
  },
  "categories": [
    "forms"
  ],
  "type": "registry:ui"
}