{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "chip",
  "title": "Chip",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-native/components/chip/Chip.tsx",
      "content": "import * as React from 'react'\nimport { Pressable, View, type PressableProps, type ViewProps } from 'react-native'\nimport { Check, X } from 'lucide-react-native'\nimport { IconButton } from '@/components/ui/icon-button'\nimport { Text } from '@/components/ui/text'\nimport { useThemeColors } from '@/lib/theme'\nimport { cn } from '@/lib/utils'\n\nexport interface ChipProps extends Omit<PressableProps, 'children' | 'style'> {\n  label: string\n  selected?: boolean\n  onRemove?: () => void\n  removeLabel?: string\n  prefixIcon?: React.ReactNode\n  className?: string\n  style?: ViewProps['style']\n}\n\nexport const Chip = React.forwardRef<React.ComponentRef<typeof Pressable>, ChipProps>(\n  (\n    {\n      label,\n      selected,\n      onRemove,\n      removeLabel = `Remove ${label}`,\n      prefixIcon,\n      disabled,\n      onPress,\n      onLongPress,\n      className,\n      style,\n      ...props\n    },\n    ref,\n  ) => {\n    const colors = useThemeColors()\n    const content = (\n      <>\n        {selected ? <Check size={18} color={colors.secondaryForeground} aria-hidden /> : prefixIcon}\n        <Text size=\"sm\" className=\"min-w-0 shrink text-secondary-foreground\">\n          {label}\n        </Text>\n      </>\n    )\n    const bodyClassName = 'min-h-[48px] min-w-0 shrink flex-row items-center gap-[8px] px-3'\n    return (\n      <View\n        className={cn(\n          'max-w-full flex-row items-center self-start rounded-full border bg-secondary',\n          selected ? 'border-primary' : 'border-transparent',\n          disabled && 'opacity-50',\n          className,\n        )}\n        style={style}\n      >\n        {onPress || onLongPress ? (\n          <Pressable\n            ref={ref}\n            {...props}\n            accessibilityRole=\"button\"\n            accessibilityLabel={props.accessibilityLabel ?? label}\n            accessibilityState={{ ...props.accessibilityState, selected, disabled: !!disabled }}\n            disabled={disabled}\n            onPress={(event) => {\n              if (!disabled) onPress?.(event)\n            }}\n            onLongPress={onLongPress}\n            className={cn(bodyClassName, 'rounded-full active:opacity-80')}\n          >\n            {content}\n          </Pressable>\n        ) : (\n          <View ref={ref} {...props} className={bodyClassName}>\n            {content}\n          </View>\n        )}\n        {onRemove ? (\n          <IconButton\n            icon={X}\n            iconSize={18}\n            iconColor={colors.secondaryForeground}\n            accessibilityLabel={removeLabel}\n            disabled={disabled}\n            onPress={onRemove}\n            className=\"rounded-full\"\n          />\n        ) : null}\n      </View>\n    )\n  },\n)\nChip.displayName = 'Chip'\n",
      "type": "registry:ui",
      "target": "~/components/ui/chip/Chip.tsx"
    },
    {
      "path": "packages/registry-native/components/chip/index.ts",
      "content": "export * from './Chip'\n",
      "type": "registry:ui",
      "target": "~/components/ui/chip/index.ts"
    }
  ],
  "dependencies": [
    "lucide-react-native"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://native.uipkge.dev/r/native/icon-button.json",
    "https://native.uipkge.dev/r/native/text.json"
  ],
  "description": "Static, selectable, or removable chip with caller-owned selection and a separate removal target.",
  "categories": [
    "control"
  ]
}