Ethereal Garden

Select

Displays a list of options for the user to select from, with a dropdown trigger button.

When To Use

Use the Select component when you need to:

  • Allow users to choose a single option from a list of predefined choices
  • Conserve space in forms where dropdown selection is more appropriate than radio buttons
  • Display a list of options that might be too long for radio buttons
  • Provide a familiar selection pattern for form elements
  • Create a hierarchical selection interface with option groups

Select is best used when there's a predefined list of options and users need to select exactly one item from that list.

Examples

Basic

With Label

Select your local timezone for accurate scheduling.

Grouped Options

Disabled

Disabled Select

Select with Disabled Options

Props

Select

PropTypeDefault
onValueChange?
((value: string) => void)
-
value?
string
-
form?
string
-
required?
boolean
-
disabled?
boolean
-
autoComplete?
string
-
name?
string
-
onOpenChange?
((open: boolean) => void)
-
defaultOpen?
boolean
-
open?
boolean
-

SelectTrigger

PropTypeDefault
asChild?
boolean
-
value?
string | number | readonly string[]
-
type?
"button" | "submit" | "reset"
-
name?
string
-
formTarget?
string
-
formNoValidate?
boolean
-
formMethod?
string
-
formEncType?
string
-
formAction?
string | ((formData: FormData) => void | Promise<void>)
-
disabled?
boolean
-
key?
Key | null
-
form?
string
-

SelectValue

PropTypeDefault
placeholder?
ReactNode
-
asChild?
boolean
-
key?
Key | null
-

SelectContent

PropTypeDefault
position?
"item-aligned" | "popper"
-
onPointerDownOutside?
((event: PointerDownOutsideEvent) => void)
-
onEscapeKeyDown?
((event: KeyboardEvent) => void)
-
onCloseAutoFocus?
((event: Event) => void)
-
updatePositionStrategy?
"always" | "optimized"
-
hideWhenDetached?
boolean
-
sticky?
"partial" | "always"
-
collisionPadding?
number | Partial<Record<"top" | "right" | "bottom" | "left", number>>
-
collisionBoundary?
Boundary | Boundary[]
-
avoidCollisions?
boolean
-
arrowPadding?
number
-
alignOffset?
number
-
align?
"center" | "start" | "end"
-
sideOffset?
number
-
side?
"top" | "right" | "bottom" | "left"
-
asChild?
boolean
-
key?
Key | null
-

SelectItem

PropTypeDefault
textValue?
string
-
disabled?
boolean
-
value
string
-
asChild?
boolean
-
key?
Key | null
-

SelectGroup

PropTypeDefault
asChild?
boolean
-
key?
Key | null
-

SelectLabel

PropTypeDefault
asChild?
boolean
-
key?
Key | null
-

SelectSeparator

PropTypeDefault
asChild?
boolean
-
key?
Key | null
-

SelectScrollUpButton

PropTypeDefault
asChild?
boolean
-
key?
Key | null
-

SelectScrollDownButton

PropTypeDefault
asChild?
boolean
-
key?
Key | null
-