@billogram/use-typeahead

A React hook for handling typeahead functionality

Usage no npm install needed!

<script type="module">
  import billogramUseTypeahead from 'https://cdn.skypack.dev/@billogram/use-typeahead';
</script>

README

@billogram/use-typeahead

A React hook for handling typeahead functionality

Install

yarn add @billogram/use-typeahead

Usage

import useTypeahead from '@billogram/use-typeahead';

See types for exported types.

useTypeahead

const {
    handleKeyPress,
    isTypeahead,
} = useTypeahead((text) => {
    // do something when `text` is updated
});

Note

This library is being published with our use cases in mind and is not necessarily meant to be consumed by the broader public. We probably won't take your feature requests unless they align with our own needs.

License

MIT