{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "form-field",
  "title": "Form Field",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-native/components/form-field/FormField.tsx",
      "content": "import * as React from 'react'\nimport { View, type AccessibilityProps, type ViewProps } from 'react-native'\nimport { Text } from '@/components/ui/text'\nimport { useAnnouncement } from '@/lib/accessibility'\nimport { cn } from '@/lib/utils'\n\nexport interface FormFieldControlProps extends AccessibilityProps {\n  nativeID: string\n  invalid: boolean\n}\n\nexport interface FormFieldProps extends Omit<ViewProps, 'children'> {\n  label: string\n  description?: string\n  error?: string\n  announceError?: boolean\n  required?: boolean\n  className?: string\n  /** Spread these props onto the field. Its value, handlers, and ref stay with the caller. */\n  children: (props: FormFieldControlProps) => React.ReactNode\n}\n\nconst FormField = React.forwardRef<React.ComponentRef<typeof View>, FormFieldProps>(\n  ({ label, description, error, announceError = true, required, className, children, ...props }, ref) => {\n    const id = React.useId()\n    useAnnouncement(error && announceError ? `${label}. ${error}` : undefined)\n    const hint = [description, error].filter(Boolean).join(' ')\n    return (\n      <View ref={ref} {...props} className={cn('gap-2', className)}>\n        <Text size=\"sm\" className=\"font-medium\">\n          {label}\n          {required ? ' (required)' : ''}\n        </Text>\n        {description ? (\n          <Text size=\"sm\" variant=\"muted\">\n            {description}\n          </Text>\n        ) : null}\n        {children({\n          nativeID: `field-${id}`,\n          accessibilityLabel: required ? `${label}, required` : label,\n          accessibilityHint: hint || undefined,\n          invalid: !!error,\n        })}\n        {error ? (\n          <Text size=\"sm\" className=\"text-destructive\">\n            {error}\n          </Text>\n        ) : null}\n      </View>\n    )\n  },\n)\nFormField.displayName = 'FormField'\n\nexport { FormField }\n",
      "type": "registry:ui",
      "target": "~/components/ui/form-field/FormField.tsx"
    },
    {
      "path": "packages/registry-native/components/form-field/index.ts",
      "content": "export { FormField, type FormFieldProps, type FormFieldControlProps } from './FormField'\n",
      "type": "registry:ui",
      "target": "~/components/ui/form-field/index.ts"
    }
  ],
  "dependencies": [],
  "devDependencies": [],
  "registryDependencies": [
    "https://native.uipkge.dev/r/native/text.json",
    "https://native.uipkge.dev/r/native/accessibility.json"
  ],
  "description": "Persistent field labels, instructions, required state, and announced validation errors. A render function connects native accessibility props to the caller-owned control.",
  "categories": [
    "form"
  ]
}