This utility offers a type-ahead function that can be applied to input elements.
It generates a list with keywords fetched from a server.
Veams >= v5.0.0
- Veams Framework.
veams install vu type-ahead
bower install veams-utility-type-ahead --save
- settings.typeAheadClasses {
String
} - Modifier classes. - settings.typeAheadJsOptions {
Object
} - Options object which gets stringified. - settings.height {
Number
} - Height of suggestion list.
The module gives you the possibility to override default options:
- currentValueClass {
String
} ['type-ahead__current-value'] - Current value class. - inputSel {
String
} [[data-js-item="type-ahead__input"]] - Element selector for input. - minLength {
Number
} [2] - Minimal length of input value before suggestions will be shown. - minLoadTime {
Number
} [0] - Minimal time that must have passed before new request is sent to server. - suggestionItemSel {
String
} [[data-js-item="suggestion-item"]] - Element selector for suggestion item. - suggestionItemSel {
String
} [[data-js-item="type-ahead__list"]] - Element selector for type-ahead list. - templates.tplSuggestionsA11y {
String
} ['SUGGESTIONS__A11Y'] - Template name for suggestion (list item). - templates.tplSuggestionsOpt {
String
} ['SUGGESTIONS__OPTIONS'] - Template name for option.