{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "type": "registry:ui",
  "title": "Label",
  "description": "The visible text that names a form control, with an optional required mark that screen readers announce too.",
  "dependencies": [],
  "registryDependencies": [
    "https://ui.klarhimmel.com/r/theme.json",
    "https://ui.klarhimmel.com/r/utils.json"
  ],
  "files": [
    {
      "path": "src/ui/label.tsx",
      "type": "registry:file",
      "target": "components/klarhimmel/ui/label.tsx",
      "content": "import { forwardRef, type LabelHTMLAttributes } from 'react';\nimport { cn } from '../lib/utils';\n\nexport interface LabelProps extends LabelHTMLAttributes<HTMLLabelElement> {\n  /** Adds a visible \"required\" mark. It does not set `required` on the control: do that on the control itself. */\n  required?: boolean;\n}\n\n/** The text that names a control. Use it with `htmlFor`; inside Field the label is already wired. */\nexport const Label = forwardRef<HTMLLabelElement, LabelProps>(function Label({ className, required, children, ...rest }, ref) {\n  return (\n    <label ref={ref} className={cn('text-kh-small font-medium text-kh-ink peer-disabled:cursor-not-allowed peer-disabled:text-kh-muted', className)} {...rest}>\n      {children}\n      {required && <span className=\"ml-0.5 text-kh-danger\">*<span className=\"sr-only\"> (required)</span></span>}\n    </label>\n  );\n});\n"
    }
  ]
}
