react-bootstrap-typeahead is a React-based autocomplete component that integrates seamlessly with Bootstrap for styling, providing a familiar UI/UX. The current stable version is 6.4.1, with a major version 7.0.0-rc.x series in active development, indicating a consistent release cadence with significant updates. It offers both single and multi-selection capabilities, and is built with WAI-ARIA authoring practices compliance for accessibility. Key differentiators include its tight integration with Bootstrap 4/5, support for asynchronous data loading, customizable rendering, and a move towards composable primitives in the upcoming v7 to offer more flexibility compared to a monolithic component, making it suitable for complex auto-suggestion needs in Bootstrap-themed React applications. It dropped support for Bootstrap 4 in v7.0.0-rc.1, focusing on Bootstrap 5+.
npm install react-bootstrap-typeaheadVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates a basic Typeahead component with static options, single selection, a clear button, and custom menu item rendering, suitable for Bootstrap 5 environments.
Consult the official upgrade guide (`https://github.com/ericgio/react-bootstrap-typeahead/blob/7.x/docs/Upgrading.md`) for specific migration steps. Adjust `onInputChange` callback signatures and ensure `onItemSelect` is passed to custom `MenuItem` components.
If migrating to v7, upgrade your project's Bootstrap dependency to v5+. If remaining on Bootstrap 4, use `react-bootstrap-typeahead` v6.x.
Ensure `import 'react-bootstrap-typeahead/css/Typeahead.css';` and, if using Bootstrap 5, `import 'react-bootstrap-typeahead/css/Typeahead.bs5.css';` are present in your application's entry point or component where the Typeahead is used.
Review the v7 upgrade guide (`https://github.com/ericgio/react-bootstrap-typeahead/blob/7.x/docs/Upgrading.md#v70-breaking-changes`) for detailed changes regarding component structure and styling. Adopt new hooks like `useTypeahead` for custom implementations.
Always refer to the version-specific documentation if not using the latest release, or upgrade to the latest stable version to align with current examples and features.
Use the ESM import syntax: `import { Typeahead } from 'react-bootstrap-typeahead';`Ensure that `import 'react-bootstrap-typeahead/css/Typeahead.css';` is present. If using Bootstrap 5, also include `import 'react-bootstrap-typeahead/css/Typeahead.bs5.css';`.
Refer to the v7 upgrade guide or examples for custom menu rendering. Ensure `onItemSelect` is properly passed to your custom `MenuItem` to handle selection events.