Skip to content
SevenUI
Sign inGet Pro
On this page

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 to start/end. Callback details.reason strings are UI SDK's (for example trigger-press, escape-key, outside-press). An initialFocus or finalFocus function 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. finalFocus is ignored: focus always returns to the trigger. Without items, SelectValue shows the selected item's label rather than its raw value.

Select

Extends the Base UI Select Root — all its props apply.

PropTypeDefault
itemsRecord<string, ReactNode> | { label, value }[]—
value / defaultValueitem value (array when multiple)—
onValueChange(value) => void—
multiplebooleanfalse
disabled / required / readOnlybooleanfalse

When items is given, SelectValue renders the matching item’s label instead of the raw value.

SelectTrigger

Extends the Base UI Trigger.

PropTypeDefault
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.

Was this page helpful?