Elements

Components

Combobox

Combobox, dressed in the paper-and-ink system: the field carries the control recipe and its matches dissolve open as a paper vessel, the checked row taking the flat ink fill. The parts — Root, Label, Control, Input, Trigger, ClearTrigger, Positioner, Content, List, Empty, Item, ItemText, ItemIndicator, ItemGroup, ItemGroupLabel.

#Basic usage

combobox/basic Vue React

#Props

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

#Empty

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

#Input

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
itemCollectionItemThe 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 field row.
allowCustomValuebooleanWhether to allow typing custom values in the input
alwaysSubmitOnEnterbooleanWhether to allow bypassing the default two-step behavior (Enter to close combobox, then Enter to submit form) and instead submit the form immediately on Enter press. This is useful for single-field autocomplete forms where Enter should submit the form directly.
autoFocusbooleanWhether to autofocus the input on mount
closeOnSelectbooleanWhether to close the combobox when an item is selected.
collectionListCollection<T>The collection of items
compositebooleantrueWhether the combobox is a composed with other composite widgets like tabs
defaultHighlightedValuestringThe initial highlighted value of the combobox when rendered. Use when you don't need to control the highlighted value of the combobox.
defaultInputValuestring""The initial value of the combobox's input when rendered. Use when you don't need to control the value of the combobox's input.
defaultOpenbooleanThe initial open state of the combobox when rendered. Use when you don't need to control the open state of the combobox.
defaultValuestring[][]The initial value of the combobox's selected items when rendered. Use when you don't need to control the value of the combobox's selected items.
disabledbooleanWhether the combobox is disabled
disableLayerbooleanWhether to disable registering this a dismissable layer
formstringThe associate form of the combobox.
highlightedValuestringThe controlled highlighted value of the combobox
idstringThe unique identifier of the machine.
idsPartial<{ root: string; label: string; control: string; input: string; content: string; trigger: string; clearTrigger: string; item(id: string, index?: number): string; positioner: string; itemGroup(id: string | number): string; itemGroupLabel(id: string | number): string; }>The ids of the elements in the combobox. Useful for composition.
inputBehavior'autohighlight' | 'autocomplete' | 'none'"none"Defines the auto-completion behavior of the combobox. - autohighlight: The first focused item is highlighted as the user types - autocomplete: Navigating the listbox with the arrow keys selects the item and the input is updated
inputValuestringThe controlled value of the combobox's input
invalidbooleanWhether the combobox is invalid
loopFocusbooleantrueWhether to loop the keyboard navigation through the items
modelValuestring[]The v-model value of the combobox
multiplebooleanWhether to allow multiple selection. Good to know: When multiple is true, the selectionBehavior is automatically set to clear. It is recommended to render the selected items in a separate container.
namestringThe name attribute of the combobox's input. Useful for form submission
navigate(details: combobox.NavigateDetails) => voidFunction to navigate to the selected item
openbooleanThe controlled open state of the combobox
openOnChangeboolean | ((details: combobox.InputValueChangeDetails) => boolean)trueWhether to show the combobox when the input value changes
openOnClickbooleanfalseWhether to open the combobox popup on initial click on the input
openOnKeyPressbooleantrueWhether to open the combobox on arrow key press
placeholderstringThe placeholder text of the combobox's input
positioningcombobox.PositioningOptions{ placement: "bottom-start" }The positioning options to dynamically position the menu
readOnlybooleanWhether the combobox is readonly. This puts the combobox in a "non-editable" mode but the user can still interact with it
requiredbooleanWhether the combobox is required
scrollToIndexFn(details: combobox.ScrollToIndexDetails) => voidFunction to scroll to a specific index
selectionBehavior'clear' | 'replace' | 'preserve'"replace"The behavior of the combobox input when an item is selected - replace: The selected item string is set as the input value - clear: The input value is cleared - preserve: The input value is preserved
translationscombobox.IntlTranslationsSpecifies the localized strings that identifies the accessibility elements and their states

#Trigger

PropTypeDefaultDescription
focusableboolean | undefinedWhether the trigger is focusable