{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "type": "registry:ui",
  "title": "Label",
  "description": "Accessible form label wired to its control, with required and disabled styling.",
  "dependencies": [
    "@radix-ui/react-label",
    "@saasflare/ui"
  ],
  "files": [
    {
      "path": "components/ui/label.tsx",
      "type": "registry:ui",
      "content": "// @toreview\n\"use client\"\n\n/**\n * @fileoverview Label primitive — accessible form label with disabled state awareness.\n * Built on Radix UI Label. Part of the Saasflare base component layer.\n * @module packages/ui/components/ui/label\n * @layer core\n *\n * @component\n * @example\n * import { Label } from '@saasflare/ui';\n * <Label htmlFor=\"email\">Email address</Label>\n */\n\nimport * as React from \"react\"\nimport * as LabelPrimitive from \"@radix-ui/react-label\"\n\nimport { useSaasflareProps, type SaasflareComponentProps } from \"@saasflare/ui\"\nimport { cn } from \"@saasflare/ui\"\n\ninterface LabelProps\n  extends Omit<React.ComponentProps<typeof LabelPrimitive.Root>, keyof SaasflareComponentProps>,\n    SaasflareComponentProps {}\n\n/**\n * Accessible form label built on the Radix Label primitive. Dims itself when\n * the associated peer control or `data-disabled` group is disabled; associate\n * with a control via `htmlFor`.\n *\n * @component\n * @layer core\n *\n * @example\n * <Label htmlFor=\"email\">Email address</Label>\n */\nfunction Label({\n  className,\n  surface,\n  radius,\n  animated,\n  iconWeight,\n  ...props\n}: LabelProps) {\n  const sf = useSaasflareProps({ surface, radius, animated, iconWeight })\n\n  return (\n    <LabelPrimitive.Root\n      data-slot=\"label\"\n      data-surface={sf.surface}\n      data-radius={sf.radius}\n      data-animated={String(sf.animated)}\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\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Label }\n",
      "target": "components/ui/label.tsx"
    }
  ],
  "$meta": {
    "source": "https://ui.saasflare.io/r/label.json"
  }
}
