Skip to content

co-combobox

This content is not available in your language yet.

Ver código
<co-combobox label="Ejemplo"></co-combobox>

Props

PropAtributoTipoDefaultDescripción
clearableclearablebooleantrueShow clear button when value is selected
disableddisabledbooleanfalseDisabled state
footerPrimaryLabelfooter-primary-labelstring'Ok'Label for the primary footer button
footerSecondaryLabelfooter-secondary-labelstring'New Tags'Label for the secondary footer button
helperTexthelper-textstring | undefinedHelper text displayed below the combobox
iconLefticon-leftstring | undefinedPhosphor icon name for the left position
labellabelstring | undefinedLabel text displayed above the combobox
layoutlayout"horizontal" | "vertical"'vertical'Label layout: vertical (label above) or horizontal (label beside)
multiplemultiplebooleantrueWhether multiple values can be selected
optionsoptionsComboboxOption[] | string | string[]'[]'Options to display in the dropdown (array of objects or strings)
placeholderplaceholderstring''Placeholder text. Empty by default — a literal "Placeholder" leaking into product UIs when the consumer forgets the prop is worse than no hint.
requiredrequiredbooleanfalseWhether the field is required (renders a required marker on the label).
searchPlaceholdersearch-placeholderstring'Search'Search placeholder text
searchablesearchablebooleanfalseEnable search/filter in the dropdown
secondaryLabelsecondary-labelstring | undefinedSecondary label displayed on the right side
showFootershow-footerbooleanfalseShow footer buttons (New Tags + Ok)
sizesize"lg" | "md" | "s" | "sm"'md'Trigger size (mirrors co-input/co-select): s 28 / sm 32 / md 40 / lg 48
statusstatus"default" | "error" | "info" | "success" | "warning"'default'Validation status
valuevaluestring | string[]'[]'Currently selected values (multi-select)

Eventos

EventoDetailBubblesCancelableDescripción
coChangestring[]Emitted when the selection changes
coClearvoidEmitted when the clear button is clicked
coClosevoidEmitted when the dropdown closes
coFooterPrimaryvoidEmitted when the primary footer button is clicked
coFooterSecondaryvoidEmitted when the secondary footer button is clicked
coOpenvoidEmitted when the dropdown opens

Slots

Este componente no expone slots.

CSS Parts

PartDescripción
::part(clear)
::part(dropdown)
::part(footer)
::part(helper)
::part(label)
::part(option)
::part(options)
::part(search)
::part(search-input)
::part(secondary-label)
::part(trigger)
::part(wrapper)

CSS Custom Properties

Este componente no expone CSS custom properties.