{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "title": "Label",
  "description": "Accessible form labels with required and optional markers.",
  "dependencies": [
    "radix-ui"
  ],
  "registryDependencies": [
    "utils",
    "https://ui.cuelark.com/r/theme.json"
  ],
  "files": [
    {
      "path": "src/registry/cuelark/ui/label.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\nimport { Label as LabelPrimitive } from \"radix-ui\";\n\nimport { cn } from \"@/lib/utils\";\n\ntype LabelProps = React.ComponentProps<typeof LabelPrimitive.Root> & {\n  /** Appends a required mark (announced as \"required\"). */\n  required?: boolean;\n  /** Appends a quiet mono \"optional\" tag, for forms where most fields are required. */\n  optional?: boolean;\n};\n\nfunction Label({ className, required, optional, children, ...props }: LabelProps) {\n  return (\n    <LabelPrimitive.Root\n      data-slot=\"label\"\n      className={cn(\n        \"inline-flex items-center gap-1.5 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      {children}\n      {required && (\n        <span className=\"text-destructive\">\n          <span aria-hidden=\"true\">*</span>\n          <span className=\"sr-only\">required</span>\n        </span>\n      )}\n      {optional && <span className=\"cue-label normal-case tracking-normal\">optional</span>}\n    </LabelPrimitive.Root>\n  );\n}\n\nexport { Label };\nexport type { LabelProps };\n",
      "type": "registry:ui"
    }
  ],
  "docs": "Docs and examples: https://ui.cuelark.com/components/label",
  "categories": [
    "forms"
  ],
  "type": "registry:ui"
}