Skip to content

AlexejKossmann/autocomplete

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Autocomplete in pure JavaScript written in Typescript

This library is in pure JavaScript and is written in TypeScript. It is designed to be fast and have zero dependencies.

Installation

Configuration

Options

Key Description Type Default
selector Selector to identify the input field with autocomplete String -
data Data to be autocompleted from Array JSON Function []
key Name of the property in JSON Object to autoselect for String -
threshold Minimun number of characters to start render results Number 0
debounce Idle duration after entering new character to start render results in milliseconds Number 100
limit Maximum number of displayed resuls Number 10
isCaseSensitive Case sensitivity in the search of results Boolean false
highlight Highlight the entered characters in the result list Boolean false

Example

const options = {
    selector: '#selector',
    threshold: 3,
    key: 'capital',
    debounce: 200,
    data: dataFunction(),
    highlight: true
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published