Description
react-tooltip is a React tooltip component that shows a small piece of text or content when a user hovers over or focuses an element. You add a data-tooltip-id attribute to the element that should show the tooltip, along with a data-tooltip-content attribute for its text, and include the tooltip component once on the page. The README says that data-tooltip-id is the equivalent of the data-for attribute in version 4. The package supports React 16.14 and newer through peer dependencies, including React 17, 18 and 19, and the project is validated against React 19. It is a client-side library that uses hooks, DOM observers and browser events, so the tooltip must run inside a client component in frameworks such as Next.js with Server Components. The README shows the usual pattern, a small wrapper file marked with use client. Versions before 5.13.0 need the CSS file imported. The documentation has versions for v4, v5 and v6. The project is open source on GitHub, and the README says it is financed partly by ads on its documentation.…
Highlights
- Tooltips driven by data attributes
- React 16.14 through React 19
- Works with Next.js Server Components
- Documentation for v4, v5 and v6
Ratings & Reviews
No ratings yet
Be the first to rate react-tooltip.
People also visit
react-bootstrap-range-slider
A range slider component with tooltips for React Bootstrap
react-tooltip FAQ
What does react-tooltip do?
It shows a tooltip when a user hovers over or focuses an element in a React app.
How do I add a tooltip?
Set data-tooltip-id and data-tooltip-content on the element, and include the tooltip component once in the app.
Which React versions are supported?
React 16.14 and newer, including 17, 18 and 19, according to the README's compatibility table.
Does it work with Next.js Server Components?
Yes, if the tooltip component is rendered inside a client component, using a small wrapper file marked use client.
Do I need the CSS file?
Only for versions before 5.13.0, which need the CSS imported for the tooltip to show.
What are the best react-tooltip alternatives?
Popular alternatives to react-tooltip include react-tooltip, react-hint and react-floater. See all react-tooltip alternatives
















