Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gromnitsky/react-awesomplete-tagger

A tiny React tagger component that uses Awesomplete for completions; supports debouncing out-of-the-box
https://github.com/gromnitsky/react-awesomplete-tagger

awesomplete completions react-component tagger

Last synced: about 6 hours ago
JSON representation

A tiny React tagger component that uses Awesomplete for completions; supports debouncing out-of-the-box

Awesome Lists containing this project

README

        

# react-awesomplete-tagger

![demo](https://media.giphy.com/media/iJPDqHwV0h0S7F3xsQ/giphy.gif)

npm i react-awesomplete-tagger

* Depends on https://leaverou.github.io/awesomplete/
* Debounces completions fetching
* 1.9K minified UMD

## Usage

First:

~~~

~~~

Second, create an AwesompleteTagger component w/ a 2 predifined
competions:

~~~
Promise.resolve(['foo', 'bar'])} />
~~~

Props:

* `completions`: (required) expects a fn that returns a promise
* `opt`: an options hash that gets passed down to Awesomplete
* `debounce`: default is 200 (ms)

See `demo.*` files.

## Compile an UMD

~~~
# npm i -g rollup terser adieu
$ npm i
$ make
~~~

Results are expected in `dist/`.

## License

MIT.