1.0.1 • Published 6 years ago
predictext v1.0.1
Predictext
Predictext 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 pressing the enter key.
Demo
http://leftatom.github.io/predictext
Prequisites
npm 5.6.0 (or greater) installed
Installation
- Run
npm install predictext
to install the package - Add the
<Predictext />
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 the enter key is pressed that is passed the result in the dictionary array
{array} dictionary - a single-dimensional array containing values to compare against the user's input