Elements

Reference

Select

Select, dressed in the paper-and-ink system: the trigger is the whole control and its list dissolves open as a paper vessel, the checked row taking the flat ink fill. The parts — Root, Label, Control, Trigger, ValueText, Indicator, ClearTrigger, HiddenSelect, Positioner, Content, List, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel.

Label · Positioner · Trigger · Indicator · ClearTrigger · Item · ItemText · ItemIndicator · ItemGroup · ItemGroupLabel · List · Content · Root · Control · ValueText

#ClearTrigger

A styled part — no props of its own; it takes the anatomy's shared styling.

#Content

A styled part — no props of its own; it takes the anatomy's shared styling.

#Control

A styled part — no props of its own; it takes the anatomy's shared styling.

#HiddenSelect

A styled part — no props of its own; it takes the anatomy's shared styling.

#Indicator

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemContext

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemGroupLabel

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemGroup

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemIndicator

A styled part — no props of its own; it takes the anatomy's shared styling.

#ItemText

A styled part — no props of its own; it takes the anatomy's shared styling.

#Item

PropTypeDefaultDescription
itemTThe item to render
persistFocusboolean | undefinedWhether hovering outside should clear the highlighted state

#Label

A styled part — no props of its own; it takes the anatomy's shared styling.

#List

A styled part — no props of its own; it takes the anatomy's shared styling.

#Positioner

A styled part — no props of its own; it takes the anatomy's shared styling.

#Root

PropTypeDefaultDescription
sizeString as PropType<"sm" | "md" | "lg">"md"One rung of the control-height ladder for the trigger.
autoCompletestringThe autocomplete attribute for the hidden select. Enables browser autofill (e.g. "address-level1" for state).
closeOnSelectbooleantrueWhether the select should close after an item is selected
collectionListCollection<T>The collection of items
compositebooleantrueWhether the select is a composed with other composite widgets like tabs or combobox
defaultHighlightedValuestringThe initial value of the highlighted item when opened. Use when you don't need to control the highlighted value of the select.
defaultOpenbooleanWhether the select's open state is controlled by the user
defaultValuestring[]The initial default value of the select when rendered. Use when you don't need to control the value of the select.
deselectablebooleanWhether the value can be cleared by clicking the selected item. Note: this is only applicable for single selection
disabledbooleanWhether the select is disabled
formstringThe associate form of the underlying select.
highlightedValuestringThe controlled key of the highlighted item
idstringThe unique identifier of the machine.
idsPartial<{ 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.
invalidbooleanWhether the select is invalid
loopFocusbooleanfalseWhether to loop the keyboard navigation through the options
modelValuestring[]The model value of the select
multiplebooleanWhether to allow multiple selection
namestringThe name attribute of the underlying select.
openbooleanWhether the select menu is open
positioningselect.PositioningOptionsThe positioning options of the menu.
readOnlybooleanWhether the select is read-only
requiredbooleanWhether the select is required
scrollToIndexFn(details: select.ScrollToIndexDetails) => voidFunction to scroll to a specific index
translationsselect.IntlTranslationsSpecifies the localized strings that identifies the accessibility elements and their states
EventPayload
selectdetails: SelectionDetails
exitComplete—
valueChangedetails: ValueChangeDetails<T>
update:modelValuevalue: string[]
openChangedetails: OpenChangeDetails
update:openopen: boolean
focusOutsideevent: FocusOutsideEvent
interactOutsideevent: InteractOutsideEvent
pointerDownOutsideevent: PointerDownOutsideEvent
highlightChangedetails: HighlightChangeDetails<T>
update:highlightedValuevalue: string | null

#Trigger

A styled part — no props of its own; it takes the anatomy's shared styling.

#ValueText

PropTypeDefaultDescription
placeholderstring—