Autocomplete
Displays a list of suggested options.
import { Autocomplete } from '@skeletonlabs/skeleton';
import type { AutocompleteOption } from '@skeletonlabs/skeleton';
Demo
Whitelist
Provide a list of values you wish to whitelist. Only options with a matching value will be displayed.
Blacklist
Provide a list of values you wish to blacklist. Blaclisted options will be excluded from the list.
Data Structure
You may optionally append keywords
to provide additional search terms. As well as meta
to provide
arbitrary data - which is not utilizing for filtering. All data option data is returned by on:selection
, including
these.
const flavorOptions: AutocompleteOption[] = [
{ ..., keywords: 'mix, strawberry, chocolate, vanilla' },
{ ..., meta: { healthy: false } },
];