veams-utility-type-ahead

5.1.0 • Public • Published

npm version Gitter Chat

TypeAhead

This utility offers a type-ahead function that can be applied to input elements.

It generates a list with keywords fetched from a server.


Requirements

  • Veams >= v5.0.0 - Veams Framework.

Installation

Installation with Veams

veams install vu type-ahead


Fields

type-ahead.hbs

Settings

  • settings.typeAheadClasses {String} - Modifier classes.
  • settings.typeAheadJsOptions {Object} - Options object which gets stringified.
  • settings.height {Number} - Height of suggestion list.

JavaScript Options

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.

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 5.1.0
    0
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 5.1.0
    0
  • 5.0.0
    0
  • 4.0.0
    0

Package Sidebar

Install

npm i veams-utility-type-ahead

Weekly Downloads

0

Version

5.1.0

License

MIT

Last publish

Collaborators

  • andy-gutsche
  • sebastian-fitzner