UIIcons

Select

A custom dropdown for selecting a single value from a list of options.

Select

Installation

pnpm dlx stera-ui@latest add select

Composition

Use the following composition to build a Select:

Select
├── SelectTrigger
│   └── SelectValue
└── SelectContent
    ├── SelectGroup
    │   ├── SelectLabel
    │   ├── SelectItem
    │   └── SelectItem
    ├── SelectSeparator
    └── SelectGroup
        ├── SelectLabel
        ├── SelectItem
        └── SelectItem

Examples

Sizes

sm
md
lg
Select Sizes
SizeDescription
smSmall
mdMedium (default)
lgLarge

With Groups

Use SelectGroup, SelectLabel, and SelectSeparator to organize options into labelled sections.

Select with Groups

Disabled

Select Disabled

Invalid

Select Invalid

API Reference

Built on Base UI's Select primitive — see the full API reference there.

Select

Select is an alias for Base UI's Select.Root. Accepts all its props.

PropTypeDefault
valuestring
defaultValuestring
onValueChange(value: string) => void
disabledbooleanfalse
namestring

SelectTrigger

PropTypeDefault
size"sm" | "md" | "lg""md"

SelectContent

PropTypeDefault
side"top" | "bottom" | "left" | "right""bottom"
align"start" | "center" | "end""center"
sideOffsetnumber4
alignItemWithTriggerbooleantrue

SelectItem

PropTypeDefault
valuestring
disabledbooleanfalse