Skip to Content
Selection & Dates@hacline/ui/combobox

Combobox

Search by keyword and select one or more options.

Usage

Type a keyword in "Team", navigate with the arrow keys, and press Enter to select. Each dropdown item uses value for the submitted value and label to display the team name.

Multiple Selection and Chip Removal

Enable multiple and render selected chips with ComboboxValue. Each chip's remove button stays synchronized with the selection state.

Parts

PartDescriptionExtended Props
ComboboxArrow
An arrow on the popup's edge that points at the input.—
ComboboxChip
One selected value. Without children, it shows the value's label.—
ComboboxChipRemove
A button inside a chip that removes its value. Name it with aria-label.—
ComboboxChips
The selected values as chips, around the input.—
ComboboxChipsOverflow
How many chips don't fit on the chips' line, once some collapse. Rendering it inside ComboboxChips turns collapsing on. Without children, "+2 more".—
ComboboxClear
A button that empties the input and selects nothing. Shown while there's something to clear.—
ComboboxContent
The popup that holds the list, positioned against the input.—
ComboboxCreate
An option that creates an item from the input's text. Shown while the text matches no item's label exactly.—
ComboboxEmpty
Shown while no item matches. Its message is announced when it appears.—
ComboboxGroup
A group of items, named by its ComboboxGroupLabel, and hidden while none of its items shows.—
ComboboxGroupLabel
The group's heading, which names the group.—
ComboboxInput
The text input that filters the list and holds the chosen item's label.
size
ComboboxItem
An option. Pressing it selects it, or toggles it with multiple.—
ComboboxItemIcon
An icon inside an item. ComboboxValueIcon shows the selected item's next to the input. Screen readers, typeahead and filtering skip it, and mirror flips it in right-to-left text.—
ComboboxItemIndicator
The check inside a selected item. Rendered while it's selected, or always with keepMounted.—
ComboboxItems
Renders data items. Used by data comboboxes, and available for custom layouts.—
ComboboxItemText
The item's text, with the part the input's text matched in <mark>. Without string content, it shows the item's label.—
ComboboxLabel
A visible label for the input.—
ComboboxList
The listbox. Without children, it renders the combobox's items, filtered.—
ComboboxSelectAll
An option that selects every item that matches, with multiple: in its group inside a ComboboxGroup, or in the whole list.—
ComboboxSeparator
A line between items or groups, hidden from screen readers.—
ComboboxStatus
A polite live region for loading and result counts. Its content is yours, usually a function of its state.—
ComboboxTrigger
A button that opens and closes the list, out of the tab order.
size
ComboboxValue
The selected value, as a function of its state, like one chip per value. Without children, the labels joined with commas, or "France, Chile and 2 more" with maxLabels. Renders no element of its own.—
ComboboxValueIcon
The selected item's icon, copied from its ComboboxItemIcon, like next to the input. Rendered while one item is selected and it has an icon.—

Props

Prop

Type

View UI SDK parts and state attributes.