Skip to content

Select

<ts-select> vv0.4.0

The ts-select component.

Open in Storybook for interactive demos.

<ts-select size="md">Content</ts-select>
PropertyAttributeTypeDefaultDescription
disableddisabledbooleanfalseRenders the select as disabled.
errorerrorbooleanfalseRenders the select in an error state.
errorMessageerror-messagestring | undefinedError message displayed below the select.
helpTexthelp-textstring | undefinedHelp text displayed below the select.
labellabelstring | undefinedLabel text displayed above the select.
multiplemultiplebooleanfalseAllow multiple selections.
namenamestring | undefinedName attribute for form submission.
placeholderplaceholderstring | undefinedPlaceholder text when no value is selected.
requiredrequiredbooleanfalseMakes the select required.
sizesize"lg" | "md" | "sm" | "xl" | "xs"'md'The select size.
valuevaluestring''The current value.
EventDetailBubblesComposedDescription
tsBlurvoidYesYesEmitted when the select loses focus.
tsChangeTsSelectChangeEventDetailYesYesEmitted when the value changes.
tsFocusvoidYesYesEmitted when the select gains focus.
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.
labelThe label element.
optionAn option in the dropdown list.
triggerThe select trigger button.
ts-select::part(base) {
/* your custom styles */
}
<ts-select size="md">Content</ts-select>
import { TsSelect } from '@tessera-ui/react';
<TsSelect size="md">Content</TsSelect>