autocomplete
autocomplete(
opts):void
Defined in: components/autocomplete.ts:84
A combobox with type-ahead filtering. Supports single or multi-select (chips), optional free-text entry, and full keyboard control (arrows, enter, escape, backspace-to-remove). Implements the ARIA combobox/listbox pattern.
Parameters
Section titled “Parameters”Returns
Section titled “Returns”void
Example
Section titled “Example”// Single select from a fixed listconst $sel = A.proxy("Netherlands");S.autocomplete({ label: "Country", options: ["Belgium", "Netherlands"], bind: $sel });
// Multi-select, disallowing custom itemsconst $tags = A.proxy({value: [] as string[]});S.autocomplete({ label: "Tags", multi: true, allowCustom: false, options: ["Rust", "JS", "C++", "Klingon", "Go"], bind: A.ref($tags)});