1.0.3 • Published 6 years ago
suggestext v1.0.3
Suggestext
Suggestext is a React component that uses basic text-analysis to compare user input to a dictionary of your choosing. If a match is found, regardless of case, it's displayed and can be selected by clicking it.
Demo
http://leftatom.github.io/suggestext
Prequisites
npm 5.6.0 (or greater) installed
Installation
- Run
npm install suggestext
to install the package - Add the
<Suggestext />
component to your project (see available props below)
Customization
You can use the following props to customize the component:
{function} [callback] - a function that will be called when a result is clicked that is passed the result in the dictionary array
{array} dictionary - a single-dimensional array containing values to compare against the user's input
{number} [limit=5] - the maximum number of results to show at once