Skip to main content
Version: 1.x

@microsoft/fast-foundation > Combobox

Combobox class

A Combobox Custom HTML Element. Implements the ARIA combobox.

start - Content which can be provided before the input

end - Content which can be provided after the input

control - Used to replace the input element representing the combobox

indicator - The visual indicator representing the expanded state

  • The default slot for the options

control - The wrapper element containing the input area, including start and end

selected-value - The input element representing the selected value

indicator - The element wrapping the indicator slot

listbox - The wrapper for the listbox slotted options

change - Fires a custom 'change' event when the value updates

Signature:
export declare class Combobox extends FormAssociatedCombobox 

Properties

PropertyModifiersTypeDescription
autocompleteComboboxAutocomplete | undefinedThe autocomplete attribute.
filteredOptionsListboxOption[]The collection of currently filtered options.
openbooleanThe open attribute.
optionsListboxOption[]The list of options.
placeholderstringSets the placeholder value of the element, generally used to provide a hint to the user.
positionSelectPositionThe current state of the calculated position of the listbox.
positionAttributeSelectPositionThe placement for the listbox when the combobox is open.
valuestringThe value property.

Methods

MethodModifiersDescription
connectedCallback()
filterOptions()Filter available options by text value.
positionChanged(prev, next)
setPositioning()Calculate and apply listbox positioning based on available viewport space.