@onozaty/suggest

Simple input suggestion library demo

Basic Usage

Type a country name:

Available countries: United States, United Kingdom, Japan, Germany, France, Canada, Australia, South Korea, China, India, Brazil, Mexico, Russia, Italy, Spain, Netherlands

new Suggest.Local('countryInput', 'countrySuggestions', countries, {
  highlight: true
});

Multi-token Input

Type multiple programming languages separated by spaces:

Available languages: JavaScript, TypeScript, Python, Java, C++, C#, Ruby, PHP, Swift, Kotlin, Go, Rust, Scala, Perl, R, MATLAB, HTML, CSS, SQL, Shell, PowerShell, Dart, Lua, Haskell

new Suggest.LocalMulti('languageInput', 'languageSuggestions', languages);

Prefix Search

Type fruit names (matches only from the beginning):

Available fruits: Apple, Banana, Cherry, Date, Elderberry, Fig, Grape, Honeydew, Kiwi, Lemon, Mango, Orange, Peach, Pear, Strawberry, Watermelon

new Suggest.Local('fruitInput', 'fruitSuggestions', fruits, {
  prefix: true,
  highlight: true
});