Typeahead Deprecated
Use the new Combobox instead
Props
Example
Default Item Example
With Subtext
With Ref
You can include Tag elements in the input using the tags
prop.
Note that the Typeahead
component does not internally manage tags. That should be handled in the application state through the component's event callbacks. We recommend creating new tags on enter key presses, and removing them on backspaces when the cursor is in the beginning of the field. We also recommend filtering out empty tags.
This example showcases the recommended behavior.
With ZIndex
When Typeahead is used within a parent component that has a z-index set, a z-index will also need to be set on the Typeahead. Otherwise the Typeahead will render behind the parent component in the stacking context. Visit our Z-Index documentation for more details on how to use these utility classes.