{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "select",
  "title": "Select",
  "type": "registry:ui",
  "files": [
    {
      "path": "packages/registry-react/components/select/select.tsx",
      "content": "'use client'\n\nimport * as React from 'react'\nimport * as SelectPrimitive from '@radix-ui/react-select'\nimport { Check, ChevronDown, ChevronUp, Loader } from 'lucide-react'\nimport { cn } from '@/lib/utils'\n\nconst Select = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Root>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Root>\n>((props, ref) => <SelectPrimitive.Root {...props} ref={ref} data-uipkge=\"\" data-slot=\"select\" />)\nSelect.displayName = SelectPrimitive.Root.displayName\n\nconst SelectGroup = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Group>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Group>\n>((props, ref) => <SelectPrimitive.Group {...props} ref={ref} data-uipkge=\"\" data-slot=\"select-group\" />)\nSelectGroup.displayName = SelectPrimitive.Group.displayName\n\nconst SelectValue = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Value>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Value>\n>((props, ref) => <SelectPrimitive.Value {...props} ref={ref} data-uipkge=\"\" data-slot=\"select-value\" />)\nSelectValue.displayName = SelectPrimitive.Value.displayName\n\nconst triggerSizeClasses = {\n  sm: 'h-8 text-sm px-2.5 py-1.5',\n  default: 'h-9 text-sm px-3 py-2',\n  lg: 'h-11 text-base px-4 py-2.5',\n}\n\nconst triggerStateClasses = {\n  default: 'border-input dark:hover:bg-input/50',\n  error:\n    'border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive',\n  success: 'border-[var(--success)] focus-visible:border-[var(--success)]',\n}\n\nexport interface SelectTriggerProps\n  extends React.ComponentPropsWithoutRef<typeof SelectPrimitive.Trigger> {\n  size?: 'sm' | 'default' | 'lg'\n  state?: 'default' | 'error' | 'success'\n  loading?: boolean\n}\n\nconst SelectTrigger = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Trigger>,\n  SelectTriggerProps\n>(({ className, children, size = 'default', state = 'default', loading = false, disabled, ...props }, ref) => (\n  <SelectPrimitive.Trigger\n    ref={ref}\n    data-uipkge=\"\"\n    data-slot=\"select-trigger\"\n    data-size={size}\n    data-state-value={state}\n    disabled={disabled || loading}\n    aria-busy={loading}\n    className={cn(\n      'border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*=\\'text-\\'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 flex w-full items-center justify-between gap-2 rounded-md border bg-transparent text-sm whitespace-nowrap shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50',\n      triggerSizeClasses[size],\n      triggerStateClasses[state],\n      className,\n    )}\n    {...props}\n  >\n    {children}\n    {loading ? (\n      <Loader className=\"size-4 animate-spin opacity-50\" />\n    ) : (\n      <SelectPrimitive.Icon asChild>\n        <ChevronDown className=\"size-4 opacity-50\" aria-hidden=\"true\" />\n      </SelectPrimitive.Icon>\n    )}\n  </SelectPrimitive.Trigger>\n))\nSelectTrigger.displayName = SelectPrimitive.Trigger.displayName\n\nconst SelectScrollUpButton = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.ScrollUpButton>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollUpButton>\n>(({ className, children, ...props }, ref) => (\n  <SelectPrimitive.ScrollUpButton\n    ref={ref}\n    data-uipkge=\"\"\n    data-slot=\"select-scroll-up-button\"\n    className={cn('flex cursor-default items-center justify-center py-1', className)}\n    {...props}\n  >\n    {children ?? <ChevronUp className=\"size-4\" aria-hidden=\"true\" />}\n  </SelectPrimitive.ScrollUpButton>\n))\nSelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName\n\nconst SelectScrollDownButton = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.ScrollDownButton>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.ScrollDownButton>\n>(({ className, children, ...props }, ref) => (\n  <SelectPrimitive.ScrollDownButton\n    ref={ref}\n    data-uipkge=\"\"\n    data-slot=\"select-scroll-down-button\"\n    className={cn('flex cursor-default items-center justify-center py-1', className)}\n    {...props}\n  >\n    {children ?? <ChevronDown className=\"size-4\" aria-hidden=\"true\" />}\n  </SelectPrimitive.ScrollDownButton>\n))\nSelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName\n\nconst SelectContent = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Content>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Content>\n>(({ className, children, position = 'popper', ...props }, ref) => (\n  <SelectPrimitive.Portal>\n    <SelectPrimitive.Content\n      ref={ref}\n      data-uipkge=\"\"\n      data-slot=\"select-content\"\n      position={position}\n      className={cn(\n        'bg-popover text-popover-foreground motion-safe:data-[state=open]:animate-in motion-safe:data-[state=closed]:animate-out motion-safe:data-[state=closed]:fade-out-0 motion-safe:data-[state=open]:fade-in-0 motion-safe:data-[state=closed]:zoom-out-95 motion-safe:data-[state=open]:zoom-in-95 motion-safe:data-[side=bottom]:slide-in-from-top-2 motion-safe:data-[side=left]:slide-in-from-right-2 motion-safe:data-[side=right]:slide-in-from-left-2 motion-safe:data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] overflow-x-hidden overflow-y-auto rounded-md border shadow-md',\n        position === 'popper' &&\n          'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1',\n        className,\n      )}\n      {...props}\n    >\n      <SelectScrollUpButton />\n      <SelectPrimitive.Viewport\n        className={cn(\n          'p-1',\n          position === 'popper' &&\n            'h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1',\n        )}\n      >\n        {children}\n      </SelectPrimitive.Viewport>\n      <SelectScrollDownButton />\n    </SelectPrimitive.Content>\n  </SelectPrimitive.Portal>\n))\nSelectContent.displayName = SelectPrimitive.Content.displayName\n\nconst SelectLabel = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Label>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Label>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.Label\n    ref={ref}\n    data-uipkge=\"\"\n    data-slot=\"select-label\"\n    className={cn('text-muted-foreground px-2 py-1.5 text-xs', className)}\n    {...props}\n  />\n))\nSelectLabel.displayName = SelectPrimitive.Label.displayName\n\nconst SelectItem = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Item>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Item>\n>(({ className, children, ...props }, ref) => (\n  <SelectPrimitive.Item\n    ref={ref}\n    data-uipkge=\"\"\n    data-slot=\"select-item\"\n    className={cn(\n      'focus:bg-accent focus:text-accent-foreground [&_svg:not([class*=\\'text-\\'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\\'size-\\'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2',\n      className,\n    )}\n    {...props}\n  >\n    <span className=\"absolute right-2 flex size-3.5 items-center justify-center\">\n      <SelectPrimitive.ItemIndicator>\n        <Check className=\"size-4\" aria-hidden=\"true\" />\n      </SelectPrimitive.ItemIndicator>\n    </span>\n\n    <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>\n  </SelectPrimitive.Item>\n))\nSelectItem.displayName = SelectPrimitive.Item.displayName\n\nconst SelectItemText = SelectPrimitive.ItemText\n\nconst SelectSeparator = React.forwardRef<\n  React.ElementRef<typeof SelectPrimitive.Separator>,\n  React.ComponentPropsWithoutRef<typeof SelectPrimitive.Separator>\n>(({ className, ...props }, ref) => (\n  <SelectPrimitive.Separator\n    ref={ref}\n    data-uipkge=\"\"\n    data-slot=\"select-separator\"\n    className={cn('bg-border pointer-events-none -mx-1 my-1 h-px', className)}\n    {...props}\n  />\n))\nSelectSeparator.displayName = SelectPrimitive.Separator.displayName\n\nexport {\n  Select,\n  SelectContent,\n  SelectGroup,\n  SelectItem,\n  SelectItemText,\n  SelectLabel,\n  SelectScrollDownButton,\n  SelectScrollUpButton,\n  SelectSeparator,\n  SelectTrigger,\n  SelectValue,\n}\n",
      "type": "registry:ui",
      "target": "~/components/ui/select/select.tsx"
    },
    {
      "path": "packages/registry-react/components/select/index.ts",
      "content": "export {\n  Select,\n  SelectContent,\n  SelectGroup,\n  SelectItem,\n  SelectItemText,\n  SelectLabel,\n  SelectScrollDownButton,\n  SelectScrollUpButton,\n  SelectSeparator,\n  SelectTrigger,\n  SelectValue,\n} from './select'\n",
      "type": "registry:ui",
      "target": "~/components/ui/select/index.ts"
    }
  ],
  "dependencies": [
    "@radix-ui/react-select",
    "lucide-react"
  ],
  "devDependencies": [],
  "registryDependencies": [],
  "description": "Dropdown select primitive — single-select, with optional groups and per-item descriptions. Built on Radix UI with full keyboard navigation.",
  "categories": [
    "control"
  ]
}