{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "label",
  "title": "Label",
  "description": "`htmlFor` · own `onPress` on native",
  "dependencies": [
    "@rn-primitives/label@^1.5.2"
  ],
  "registryDependencies": [
    "@kit-native/lib-utils"
  ],
  "files": [
    {
      "path": "components/ui/label.tsx",
      "content": "import { cn } from '@/lib/utils';\nimport * as LabelPrimitive from '@rn-primitives/label';\nimport { Platform } from 'react-native';\n\n/** The id a Label gets from `htmlFor`, so a control that `<label for>` cannot reach on web can name itself. */\nexport function labelIdFor(id: string) {\n  return `${id}-label`;\n}\n\nfunction Label({\n  className,\n  nativeID,\n  onPress,\n  onLongPress,\n  onPressIn,\n  onPressOut,\n  disabled,\n  ...props\n}: React.ComponentProps<typeof LabelPrimitive.Text>) {\n  return (\n    <LabelPrimitive.Root\n      className={cn(\n        'flex select-none flex-row items-center gap-2',\n        Platform.select({\n          web: 'cursor-default leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-50 group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50',\n        }),\n        disabled && 'opacity-50'\n      )}\n      onPress={onPress}\n      onLongPress={onLongPress}\n      onPressIn={onPressIn}\n      onPressOut={onPressOut}\n      disabled={disabled}>\n      <LabelPrimitive.Text\n        className={cn(\n          'text-foreground text-sm font-medium',\n          Platform.select({ web: 'leading-none' }),\n          className\n        )}\n        nativeID={nativeID ?? (props.htmlFor ? labelIdFor(props.htmlFor) : undefined)}\n        {...props}\n      />\n    </LabelPrimitive.Root>\n  );\n}\n\nexport { Label };\n",
      "type": "registry:ui",
      "target": "components/ui/label.tsx"
    }
  ],
  "meta": {
    "exports": [
      "Label"
    ]
  },
  "docs": "Run `npx expo install --fix` afterwards so Expo SDK packages match your SDK. Needs the kit theme (`@kit-native/theme`) and `KitThemeProvider` from `@kit-native/lib-theme-context` at the root.",
  "categories": [
    "inputs"
  ],
  "type": "registry:ui"
}