{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "title": "Label",
  "author": "Ballmac <https://ui.ballmac.com>",
  "description": "An accessible form label built on Radix Label that dims itself when the paired peer control is disabled and never selects text on double-click.",
  "dependencies": [
    "radix-ui"
  ],
  "registryDependencies": [
    "utils"
  ],
  "files": [
    {
      "path": "registry/ballmac/components/label.tsx",
      "content": "// Ballmac UI: Label. https://ui.ballmac.com/components/label\n// Based on shadcn/ui's Label (MIT, Copyright (c) 2023 shadcn), restyled.\n\"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\nfunction Label({ className, ...props }: LabelProps) {\n  return (\n    <LabelPrimitive.Root\n      data-slot=\"label\"\n      className={cn(\n        \"flex select-none items-center gap-2 text-sm leading-none font-medium text-foreground\",\n        \"peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50\",\n        className\n      )}\n      {...props}\n    />\n  )\n}\n\nexport { Label, type LabelProps }\n",
      "type": "registry:ui",
      "target": "@components/ballmac/label.tsx"
    }
  ],
  "meta": {
    "schema": 1,
    "tier": "free",
    "tags": [
      "label",
      "form",
      "radix"
    ],
    "version": "1.0.0",
    "updated": "2026-09-28",
    "ai": {
      "summary": "Text label for a form control. Pair with htmlFor/id; put the control before it with className=\"peer\" (Checkbox and Switch already are) to get disabled styling.",
      "whenToUse": [
        "Naming inputs, textareas, selects, checkboxes and switches",
        "Clickable text next to a checkbox or switch"
      ],
      "whenNotToUse": [
        "Headings or section titles (use a heading element)",
        "Helper or error text under a field (use a p with text-muted-foreground or text-destructive)"
      ],
      "composesWith": [
        "input",
        "textarea",
        "checkbox",
        "switch",
        "select"
      ],
      "a11y": [
        {
          "keys": "Click",
          "action": "Focuses or toggles the associated control"
        }
      ],
      "customization": [
        "Disabled styling via peer-disabled (control before label) or a parent with group and data-disabled=\"true\"",
        "Lays out children in a row with gap-2, so icons or badges can sit beside the text"
      ]
    },
    "source": {
      "name": "shadcn/ui Label",
      "url": "https://github.com/shadcn-ui/ui",
      "license": "MIT",
      "copyright": "Copyright (c) 2023 shadcn",
      "modified": true
    },
    "examples": [
      "label-demo"
    ],
    "url": "https://ui.ballmac.com/components/label"
  },
  "categories": [
    "primitives"
  ],
  "type": "registry:ui"
}