Select
A custom dropdown with grouped items, check indicators, scroll buttons, typeahead, and full keyboard support — for when NativeSelect isn't enough.
Installation#
pnpm dlx shadcn@latest add @davinciui/selectUsage#
Composition#
Use the following composition to build a Select:
Select
├── SelectTrigger
│ └── SelectValue
└── SelectContent
├── SelectGroup
│ └── SelectGroupLabel
├── SelectLabel
├── SelectItem
└── SelectSeparatorAPI Reference#
| Prop | Type | Default |
|---|---|---|
SelectTrigger · sizeTrigger density. | "sm" | "default" | "default" |
SelectTrigger · invalidDestructive ring on the trigger. | boolean | false |
SelectValue · placeholderGray hint when nothing is selected. | ReactNode | — |
SelectContentAnimated portal panel with edge scroll buttons. Props: align, side, sideOffset. | Component | — |
SelectItemOption with check indicator, typeahead, and disabled support. | Component | — |
SelectGroup / Label / SeparatorSection structure inside the panel. | Component | — |
value / onValueChangeControlled selection. | string / fn | — |
classNameAdditional CSS classes. | string | — |
Accessibility#
Base UI supplies combobox and listbox semantics with arrow-key navigation, typeahead, Escape dismissal, and focus return to the trigger. The trigger sets aria-expanded, aria-haspopup, aria-controls, and aria-invalid; consumers must still provide an accessible name via a label or aria-label.
Motion#
The popup fades, zooms, and slides over 150ms using data-state animation classes, while trigger, icon, and item color transitions are CSS-only. motion-reduce classes disable the popup animation and the color transitions when prefers-reduced-motion is set.
Customization#
Select exposes a data-slot hook for every part, including the positioner, list, items, and scroll buttons. Style those hooks directly or pass className to the part you are composing.
Styling slots
[data-slot="select"][data-slot="select-trigger"][data-slot="select-value"][data-slot="select-content"][data-slot="select-positioner"][data-slot="select-list"][data-slot="select-group"][data-slot="select-group-label"][data-slot="select-label"][data-slot="select-item"][data-slot="select-item-text"][data-slot="select-item-indicator"][data-slot="select-icon"][data-slot="select-separator"][data-slot="select-scroll-up"][data-slot="select-scroll-down"]View source
Keep in mind
Need a custom component?
I build bespoke UI components & websites tailored to your brand.

