Description
react-typeahead is a React library that provides a typeahead, the autocomplete text box that suggests matching results as you type. It has two components. Typeahead is a basic input with a results list, and the typeahead tokenizer lets you select several results, which then appear as tokens. The README describes the library as pure React and covers usage, examples and an API reference. The options prop takes an array that can hold strings or arbitrary objects. For objects you supply filterOption and displayOption, so the component knows what to match and what to show. Other props include defaultValue for an initial value, value for a controlled input, and maxVisible to limit the number of rendered results, with resultsTruncatedMessage as a custom note when results are cut off. The customClasses prop accepts class names for the input, the results list, list items, anchors, the hover state, the typeahead wrapper and the truncated message. The README links basic and tokenizer examples, including one with simple styling. It suits React developers who want autocomplete or multi-select text entry.…
Highlights
- Autocomplete typeahead for React
- Tokenizer for selecting multiple results
- Options as strings or objects
- Limit visible results with a custom message
- Custom class names for each part
Ratings & Reviews
No ratings yet
Be the first to rate react-typeahead.
People also visit

@webscopeio/react-textarea-autocomplete
Offers autocomplete over textarea in style of GitHub

react-autosize-textarea
replacement for built-in textarea which auto resizes itself

react-autowhatever
Accessible rendering layer for Autosuggest and Autocomplete components

react-search-input
Simple react.js component for a search input, providing a filter function
react-typeahead FAQ
What is react-typeahead?
A React typeahead and autocomplete component, plus a tokenizer that lets users select multiple results.
What can the options array contain?
Strings, or arbitrary objects. For objects, provide filterOption and displayOption.
How do I limit the results shown?
Set maxVisible, and optionally resultsTruncatedMessage for the note shown when results are cut off.
Can I restyle it?
Yes. The customClasses prop takes class names for input, results, listItem, listAnchor, hover, typeahead and resultsTruncated.
Are there examples?
The README links a basic typeahead, a tokenizer, and a tokenizer with simple styling.
What are the best react-typeahead alternatives?
Popular alternatives to react-typeahead include @webscopeio/react-textarea-autocomplete, react-autosuggest and react-tagsinput. See all react-typeahead alternatives















