{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "title": "Label",
  "description": "Form label for React and shadcn with required and optional markers; clicking it focuses or toggles its control.",
  "registryDependencies": [
    "https://eased.dev/r/eased-tokens.json"
  ],
  "files": [
    {
      "path": "src/registry/eased/label/label.tsx",
      "content": "import type { ComponentPropsWithoutRef, MouseEvent, ReactNode } from \"react\";\n\nexport type LabelProps = Omit<ComponentPropsWithoutRef<\"label\">, \"className\"> & {\n  /** Shows a quiet asterisk after the label. Put `required` on the control too; this is only the marker. */\n  required?: boolean;\n  /** Shows \"Optional\" after the label: use it instead of `required` when most fields in a form are required. */\n  optional?: boolean;\n  /** Dims the label to match a disabled control. */\n  disabled?: boolean;\n  /** sm (13px) for dense forms and settings rows; md (14px) by default. */\n  size?: \"sm\" | \"md\";\n  className?: string;\n  children?: ReactNode;\n};\n\n/**\n * A form label in Eased type. Point `htmlFor` at a control, or wrap one, and clicking the\n * label focuses or toggles it. A double-click never selects the label's text. Use `Field`\n * when you also need a description and an error; Label is the standalone piece for\n * checkboxes, switches and sliders.\n */\nexport function Label({ required, optional, disabled, size = \"md\", className = \"\", onMouseDown, children, ...props }: LabelProps) {\n  const keepSelection = (e: MouseEvent<HTMLLabelElement>) => {\n    onMouseDown?.(e);\n    // A fast double-click on a label would otherwise select its text.\n    if (!e.defaultPrevented && e.detail > 1) e.preventDefault();\n  };\n  return (\n    <label\n      {...props}\n      onMouseDown={keepSelection}\n      aria-disabled={disabled || undefined}\n      className={`inline-flex min-w-0 items-baseline gap-1 font-medium ${size === \"sm\" ? \"text-ui-sm\" : \"text-ui\"} ${\n        disabled ? \"cursor-not-allowed text-text-disabled\" : \"cursor-default text-text\"\n      } ${className}`}\n    >\n      {children}\n      {required && (\n        <span aria-hidden className={disabled ? \"text-text-disabled\" : \"text-text-muted\"}>\n          *\n        </span>\n      )}\n      {optional && !required && <span className=\"font-normal text-text-muted\">Optional</span>}\n    </label>\n  );\n}\n",
      "type": "registry:ui",
      "target": "@components/eased/label/label.tsx"
    }
  ],
  "meta": {
    "details": "A form label in Eased type with required and optional markers and a disabled tone. Clicking it focuses its control, and a double-click never selects its text.",
    "industries": [
      "ai",
      "devtools",
      "finance",
      "crypto",
      "saas",
      "legal",
      "ecommerce",
      "real-estate",
      "health",
      "hr",
      "education",
      "travel",
      "media"
    ],
    "releaseAt": "2026-11-25"
  },
  "docs": "Import Label from components/eased/label/label. Props: htmlFor, required, optional, disabled, size (sm, md). The Eased tokens were merged into your global CSS; nothing to import.",
  "type": "registry:ui"
}