Skip to content

Combobox

<ts-combobox> vv0.6.3

The ts-combobox component.

Open in Storybook for interactive demos.

<ts-combobox size="md">Content</ts-combobox>
PropertyAttributeTypeDefaultDescription
disableddisabledbooleanfalseRenders the combobox as disabled.
errorerrorstring | undefinedError message displayed below the combobox.
helpTexthelp-textstring | undefinedHelp text displayed below the combobox.
labellabelstring | undefinedLabel text displayed above the combobox.
placeholderplaceholderstring | undefinedPlaceholder text for the input.
requiredrequiredbooleanfalseMakes the combobox required.
sizesize"lg" | "md" | "sm" | "xl" | "xs"'md'The combobox size.
valuevaluestring''The current selected value.
EventDetailBubblesComposedDescription
tsChange\{ value: string; \}YesYesEmitted when a value is selected.
tsInput\{ inputValue: string; \}YesYesEmitted when the input text changes.
NameDescription
*(default)*Default slot for <option> elements.

Use ::part() to style internal elements:

PartDescription
baseThe outer wrapper.
dropdownThe dropdown panel.
error-textThe error message wrapper.
help-textThe help text wrapper.
inputThe text input element.
input-wrapperThe input wrapper containing the text input and chevron.
labelThe label element.
optionAn option in the dropdown list.
ts-combobox::part(base) {
/* your custom styles */
}
<ts-combobox size="md">Content</ts-combobox>
import { TsCombobox } from '@tessera-ui/react';
<TsCombobox size="md">Content</TsCombobox>