Select
A single-select field built on Base UI Select for value display, typeahead, keyboard navigation, and form submission.
Controls
import {
Select,
SelectContent,
SelectIcon,
SelectItem,
SelectItemIndicator,
SelectItemText,
SelectList,
SelectTrigger,
SelectValue,
} from "raft-ui";
<Select defaultValue="option">
<SelectTrigger>
<SelectValue />
<SelectIcon />
</SelectTrigger>
<SelectContent>
<SelectList>
<SelectItem value="option">
<SelectItemText />
<SelectItemIndicator />
</SelectItem>
</SelectList>
</SelectContent>
</Select>Submitted through the hidden input named sort.
...propsBase UI Select.Root.Props<Value, Multiple>
Owns value, hidden input, open state, keyboard navigation, typeahead, and form submission metadata.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Root.Props<Value, Multiple> | — | Owns value, hidden input, open state, keyboard navigation, typeahead, and form submission metadata. |
renderReactElement | (props, state) => ReactElement
Replaces the trigger element entirely. When provided, the default Button and its recipe styles are skipped; pass event and aria props to your own element.
...propsBase UI Select.Trigger.Props
Default trigger renders an outline md Button. Compose SelectValue, icons, or custom inline content as children.
| Prop | Type | Default | Description |
|---|---|---|---|
render | ReactElement | (props, state) => ReactElement | — | Replaces the trigger element entirely. When provided, the default Button and its recipe styles are skipped; pass event and aria props to your own element. |
...props | Base UI Select.Trigger.Props | — | Default trigger renders an outline md Button. Compose SelectValue, icons, or custom inline content as children. |
...propsBase UI Select.Value.Props
Selected value display. Use placeholder for the empty state, or pass children to format the value.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Value.Props | — | Selected value display. Use placeholder for the empty state, or pass children to format the value. |
...propsBase UI Select.Icon.Props
Chevron or custom indicator inside the trigger.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Icon.Props | — | Chevron or custom indicator inside the trigger. |
...propsBase UI Select.Popup + Positioner props
Portaled options shell. Defaults to side=bottom, align=start, sideOffset=4, disableAnchorTracking=true, and positionMethod=fixed.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Popup + Positioner props | — | Portaled options shell. Defaults to side=bottom, align=start, sideOffset=4, disableAnchorTracking=true, and positionMethod=fixed. |
containerHTMLElement | RefObject | null
Custom portal container for framed previews or contained overlays.
...propsBase UI Select.Portal.Props
Portals the select list to the body or a custom container.
| Prop | Type | Default | Description |
|---|---|---|---|
container | HTMLElement | RefObject | null | — | Custom portal container for framed previews or contained overlays. |
...props | Base UI Select.Portal.Props | — | Portals the select list to the body or a custom container. |
...propsComponentPropsWithRef<"div">
Static panel shell for docs previews and non-portaled comparison panes.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | ComponentPropsWithRef<"div"> | — | Static panel shell for docs previews and non-portaled comparison panes. |
...propsBase UI Select.List.Props
Scrollable list container inside the popup.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.List.Props | — | Scrollable list container inside the popup. |
...propsBase UI Select.Item.Props
Option row. Selection, highlight, and disabled states are exposed through Base UI data attributes.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Item.Props | — | Option row. Selection, highlight, and disabled states are exposed through Base UI data attributes. |
...propsReact.ComponentPropsWithRef<'span'>
Optional leading slot for icons, avatars, or a reserved source-parity column before SelectItemText.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | React.ComponentPropsWithRef<'span'> | — | Optional leading slot for icons, avatars, or a reserved source-parity column before SelectItemText. |
...propsBase UI Select.ItemText.Props
Text span inside SelectItem.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.ItemText.Props | — | Text span inside SelectItem. |
...propsBase UI Select.ItemIndicator.Props
Selected-state indicator. Renders a check icon by default.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.ItemIndicator.Props | — | Selected-state indicator. Renders a check icon by default. |
...propsBase UI Select.Label.Props
Accessible label automatically associated with the select trigger when Field is not the outer owner.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Label.Props | — | Accessible label automatically associated with the select trigger when Field is not the outer owner. |
...propsBase UI Select.Group.Props
Optional grouping container for long option lists.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Group.Props | — | Optional grouping container for long option lists. |
...propsBase UI Select.GroupLabel.Props
Label for a SelectGroup.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.GroupLabel.Props | — | Label for a SelectGroup. |
...propsStyledProps<ComponentPropsWithRef<"div">>
Horizontal divider between option groups.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | StyledProps<ComponentPropsWithRef<"div">> | — | Horizontal divider between option groups. |
...propsBase UI Select.ScrollUpArrow.Props
Scroll hint shown at the top when the list overflows.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.ScrollUpArrow.Props | — | Scroll hint shown at the top when the list overflows. |
...propsBase UI Select.ScrollDownArrow.Props
Scroll hint shown at the bottom when the list overflows.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.ScrollDownArrow.Props | — | Scroll hint shown at the bottom when the list overflows. |
...propsBase UI Select.Arrow.Props
Optional arrow pointing at the trigger.
| Prop | Type | Default | Description |
|---|---|---|---|
...props | Base UI Select.Arrow.Props | — | Optional arrow pointing at the trigger. |