Home / Function/ SelectContent() — ui Function Reference

SelectContent() — ui Function Reference

Architecture documentation for the SelectContent() function in select.tsx from the ui codebase.

Entity Profile

Dependency Diagram

graph TD
  5a87dd4d_d204_f0b4_9cc8_6af971f7a8e9["SelectContent()"]
  f0dc3d5c_0244_187c_ec5b_95566c892317["select.tsx"]
  5a87dd4d_d204_f0b4_9cc8_6af971f7a8e9 -->|defined in| f0dc3d5c_0244_187c_ec5b_95566c892317
  style 5a87dd4d_d204_f0b4_9cc8_6af971f7a8e9 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/v4/registry/new-york-v4/ui/select.tsx lines 53–88

function SelectContent({
  className,
  children,
  position = "item-aligned",
  align = "center",
  ...props
}: React.ComponentProps<typeof SelectPrimitive.Content>) {
  return (
    <SelectPrimitive.Portal>
      <SelectPrimitive.Content
        data-slot="select-content"
        className={cn(
          "bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md",
          position === "popper" &&
            "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
          className
        )}
        position={position}
        align={align}
        {...props}
      >
        <SelectScrollUpButton />
        <SelectPrimitive.Viewport
          className={cn(
            "p-1",
            position === "popper" &&
              "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
          )}
        >
          {children}
        </SelectPrimitive.Viewport>
        <SelectScrollDownButton />
      </SelectPrimitive.Content>
    </SelectPrimitive.Portal>
  )
}

Subdomains

Frequently Asked Questions

What does SelectContent() do?
SelectContent() is a function in the ui codebase, defined in apps/v4/registry/new-york-v4/ui/select.tsx.
Where is SelectContent() defined?
SelectContent() is defined in apps/v4/registry/new-york-v4/ui/select.tsx at line 53.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free