react-fuzzy-input-text

1.1.0 • Public • Published

react-fuzzy-input-text

npm package

A simple fuse.js based autocomplete widget.

demo

Features

  • use the awesome fuse.js fuzzy-search library
  • up/down keys navigation

Demo

import FuzzyInput from 'react-fuzzy-input-text'
 
const cities = require('./cities.json')
 
// optional fuse.js options
const fuseOptions = {
  threshold: 0.5
}
 
return (
  <FuzzyInput
    placeholder="Search city"
    items={ cities.map(c => c.name) }
    fuseOptions={ fuseOptions }
    onChange={ item => alert(item) }
  />
)

Readme

Keywords

Package Sidebar

Install

npm i react-fuzzy-input-text

Weekly Downloads

2

Version

1.1.0

License

MIT

Last publish

Collaborators

  • revolunet