Select
Displays a select menu built on the Base UI Select primitive.
Displays a select menu built on the UI SDK Select component.
Installation
Usage
Examples
Groups
Grouped options with labels, a separator, and the small trigger size.
API reference
The UI SDK flavour is built on UI SDK Select. Its API is the SevenUI wrapper's, the same in both flavours: export names, props, data-slot values and the render prop, so code that uses only the SevenUI exports compiles against either flavour. What behaves differently, and any prop that is ignored or not supported, is listed below; code that imports a Base UI or third-party library directly needs changes. Switch to Base UI to read the prop tables, which describe that shared API in Base UI's terms.
Differences on UI SDK
- Popups open in the browser's top layer (the Popover API), rendered into
<body>as Base UI's are, with no Positioner element;side="inline-start"/"inline-end"map tostart/end. Callbackdetails.reasonstrings are UI SDK's (for exampletrigger-press,escape-key,outside-press). AninitialFocusorfinalFocusfunction receives"mouse"as its interaction, and one that returns nothing hands focus back to the trigger. - Opening by pointer highlights the first or selected option and moves focus into the list. There are no scroll arrows; the list scrolls.
finalFocusis ignored: focus always returns to the trigger. Withoutitems,SelectValueshows the selected item's label rather than its raw value.
Select
Extends the Base UI Select Root — all its props apply.
| Prop | Type | Default |
|---|---|---|
items | Record<string, ReactNode> | { label, value }[] | — |
value / defaultValue | item value (array when multiple) | — |
onValueChange | (value) => void | — |
multiple | boolean | false |
disabled / required / readOnly | boolean | false |
When items is given, SelectValue renders the matching item’s label
instead of the raw value.
SelectTrigger
Extends the Base UI Trigger.
| Prop | Type | Default |
|---|---|---|
size | "default" | "sm" | "default" |
SelectContent
Renders through Select.Portal → Select.Positioner → Select.Popup,
and always sets alignItemWithTrigger={false} on the Positioner so the
popup opens as a plain dropdown below the trigger instead of the Base UI
default, which overlaps the selected item on the trigger like a native
macOS select.
SelectValue, SelectItem, SelectGroup, SelectLabel, SelectSeparator, SelectScrollUpButton, SelectScrollDownButton
Styled Base UI parts. SelectItem takes the option value (and
disabled); the scroll buttons appear automatically when the list
overflows.