Skip to content

AutoComplete

Type to get suggestions, with keyboard up/down selection, Enter to confirm, and Esc to close.

Basic Usage

Basic usage

Typing keywords auto-filters matching items in the dropdown; / move the highlight, Enter selects, Esc closes.

Preset Value

Preset value

Disabled

Disabled

No Match

Empty state

Events

Input & selection events

Listen to oas-input (while typing) and oas-change (on selection):

API

Attributes

AttributeDescriptionTypeDefault
disabledDisabledboolean
optionsOptions, JSON array [{ label, value, disabled }]Option[] | string[]
placeholderPlaceholder textstring
valuePreset valuestring

Events

EventDescription
oas-changeSelected, detail: { value, label }
oas-inputWhile typing, detail: { value }

Keyboard: / to move, Enter to select, Esc to close.