MCPcopy Create free account
hub / github.com/vercel/examples / SelectItem

Function SelectItem

apps/vibe-coding-platform/components/ui/select.tsx:100–122  ·  view source on GitHub ↗
({
  className,
  children,
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Item>)

Source from the content-addressed store, hash-verified

98}
99
100function SelectItem({
101 className,
102 children,
103 ...props
104}: React.ComponentProps<typeof SelectPrimitive.Item>) {
105 return (
106 <SelectPrimitive.Item
107 data-slot="select-item"
108 className={cn(
109 "focus:bg-accent [&_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",
110 className
111 )}
112 {...props}
113 >
114 <span className="absolute right-2 flex size-3.5 items-center justify-center">
115 <SelectPrimitive.ItemIndicator>
116 <CheckIcon className="size-4" />
117 </SelectPrimitive.ItemIndicator>
118 </span>
119 <SelectPrimitive.ItemText>{children}</SelectPrimitive.ItemText>
120 </SelectPrimitive.Item>
121 )
122}
123
124function SelectSeparator({
125 className,

Callers

nothing calls this directly

Calls 1

cnFunction · 0.90

Tested by

no test coverage detected