booleanWhether the select should close after an item is selected
collection
ListCollection<T>The item collection
composite
true
booleanWhether the select is a composed with other composite widgets like tabs or combobox
defaultHighlightedValue
stringThe initial value of the highlighted item when opened.
Use when you don't need to control the highlighted value of the select.
defaultOpen
booleanWhether the select's open state is controlled by the user
defaultValue
string[]The initial default value of the select when rendered.
Use when you don't need to control the value of the select.
deselectable
booleanWhether the value can be cleared by clicking the selected item.
**Note:** this is only applicable for single selection
disabled
booleanWhether the select is disabled
form
stringThe associate form of the underlying select.
highlightedValue
stringThe controlled key of the highlighted item
id
stringThe unique identifier of the machine.
ids
Partial<{ root: string; content: string; control: string; trigger: string; clearTrigger: string; label: string; hiddenSelect: string; positioner: string; item(id: string | number): string; itemGroup(id: string | number): string; itemGroupLabel(id: string | number): string; }>The ids of the elements in the select. Useful for composition.
invalid
booleanWhether the select is invalid
keepMounted
booleanWhether to keep the component mounted after exit.
lazyMount
booleanWhether to enable lazy mounting.
loopFocus
false
booleanWhether to loop the keyboard navigation through the options
multiple
booleanWhether to allow multiple selection
name
stringThe `name` attribute of the underlying select.
onFocusOutside
(event: FocusOutsideEvent) => voidFunction called when the focus is moved outside the component
onHighlightChange
(details: HighlightChangeDetails<T>) => voidThe callback fired when the highlighted item changes.
onInteractOutside
(event: InteractOutsideEvent) => voidFunction called when an interaction happens outside the component
onOpenChange
(details: OpenChangeDetails) => voidFunction called when the popup is opened
onPointerDownOutside
(event: PointerDownOutsideEvent) => voidFunction called when the pointer is pressed down outside the component
onValueChange
(details: ValueChangeDetails<T>) => voidThe callback fired when the selected item changes.
open
booleanWhether the select menu is open
positioning
PositioningOptionsThe positioning options of the menu.
readOnly
booleanWhether the select is read-only
required
booleanWhether the select is required
scrollToIndexFn
(details: ScrollToIndexDetails) => voidFunction to scroll to a specific index
value
string[]The controlled keys of the selected items
asChild
SnippetRender a different element.
Data Attribute
Value
data-invalid
Present when invalid
data-part
root
data-readonly
Present when read-only
data-scope
select
ClearTrigger
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-invalid
Present when invalid
data-part
clear-trigger
data-scope
select
Content
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-activedescendant
data-part
content
data-placement
The placement of the content
data-scope
select
data-state
"open" | "closed"
Control
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-focus
Present when focused
data-invalid
Present when invalid
data-part
control
data-scope
select
data-state
"open" | "closed"
Indicator
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-invalid
Present when invalid
data-part
indicator
data-readonly
Present when read-only
data-scope
select
data-state
"open" | "closed"
Item
Prop
Default
Description
item
anyThe item data.
persistFocus
booleanWhether hovering outside should clear the highlighted state.
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-highlighted
Present when highlighted
data-part
item
data-scope
select
data-state
"checked" | "unchecked"
data-value
The value of the item
ItemGroup
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-part
item-group
data-scope
select
ItemGroupLabel
Prop
Default
Description
asChild
SnippetRender a different element.
ItemIndicator
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-part
item-indicator
data-scope
select
data-state
"checked" | "unchecked"
ItemText
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-highlighted
Present when highlighted
data-part
item-text
data-scope
select
data-state
"checked" | "unchecked"
Label
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-invalid
Present when invalid
data-part
label
data-readonly
Present when read-only
data-scope
select
List
Prop
Default
Description
asChild
SnippetRender a different element.
Positioner
Prop
Default
Description
asChild
SnippetRender a different element.
Trigger
Prop
Default
Description
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-invalid
Present when invalid
data-part
trigger
data-placeholder-shown
Present when placeholder is shown
data-placement
The placement of the trigger
data-readonly
Present when read-only
data-scope
select
data-state
"open" | "closed"
ValueText
Prop
Default
Description
placeholder
stringThe placeholder text to display when no value is selected.
asChild
SnippetRender a different element.
Data Attribute
Value
data-disabled
Present when disabled
data-focus
Present when focused
data-invalid
Present when invalid
data-part
value-text
data-scope
select
Accessibility
Keyboard Support
Key
Description
Space
When focus is on trigger, opens the select and focuses the first selected item. When focus is on the content, selects the highlighted item.
Enter
When focus is on trigger, opens the select and focuses the first selected item. When focus is on content, selects the focused item.
ArrowDown
When focus is on trigger, opens the select. When focus is on content, moves focus to the next item.
ArrowUp
When focus is on trigger, opens the select. When focus is on content, moves focus to the previous item.
Esc
Closes the select and moves focus to trigger.
A-Z + a-z
When focus is on trigger, selects the item whose label starts with the typed character. When focus is on the listbox, moves focus to the next item with a label that starts with the typed character.