rp

react-predict

ReactJS for input with autocomplete based on list of words

Showing:

Popularity

Downloads/wk

1

GitHub Stars

36

Maintenance

Last Commit

6yrs ago

Contributors

0

Package

Dependencies

4

Size (min+gzip)

40.6KB

License

MIT

Type Definitions

Tree-Shakeable

No?

Readme

react-predict

ReactJS for input with autocomplete based on list of words.

Build Status Code Climate

Installation

With npm:

  $ npm install react-predict

With Bower:

  $ bower install react-predict

Or use the files on dist folder.

Don't forget to import the react-predict.css (or react-predict.min.css) file too.

Usage

  var words = [
    'This',
    'is',
    'Sparta'
  ];

  React.render(<Predict words={ words } {...otherOptions /* See below */}/>,
              document.getElementById('search-box'));

Options

You can pass the following props for Predict:

  • words: Array of words or jsT9 instance. (default: [])
  • wordsSettings: If words option is an array, wordsSettings will be passed when instancing the jsT9 tree. (default: {})
  • itemComponent: Component that will wrap each of the suggested items. (default: 'div')
  • itemProps: Properties of each of the suggested items. (default: {})
  • inputProps: Properties of the input field. (default: {})
  • fillOnChoose: If should fill the input when suggested item is clicked. (default: true)
  • hideOnChoose: If should hide the suggestion list when item is clicked. (default: true)
  • hideOnClickOutside: If should hide the suggestion list when it is clicked outside of it. (default: true)

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100