Back
This example shows a multi-select autocomplete where selected tags are displayed above the input field, and a clear button is used.
const tagAutocomplete = new AvalynxAutocomplete('#tagSearch', {
data: tags,
maxSelections: 3,
tagsPosition: 'above',
clearStyle: 'button',
onChange: (keys, values) => console.log('Tags:', keys, values)
}, {
placeholder: 'Add tags (max. 3)...',
noResults: 'No tags found',
removeTitle: 'Remove'
});
AvalynxAutocomplete on GitHub Avalynx on GitHub