Description
react-tooltip is a tooltip component for React, from the ReactTooltip project. You add data-tooltip-id and data-tooltip-content attributes to an element, then include the tooltip element with a matching id, and the library shows the tooltip on hover or focus. It is installed from npm and imported from the package, and the README notes that the component is the successor to version 4's data-for attribute. For versions earlier than 5.13.0, you must import the CSS file or the tooltip will not show. The library supports React 16.14 and newer through peer dependencies, including React 17, 18 and 19, and the README says the current version is validated against React 19. It is a client-side library that uses hooks, DOM observers and browser events, so it must render inside a client component in frameworks such as Next.js with Server Components. The README shows a pattern for that: export the tooltip from a small wrapper file marked as a client component. The project is open source on GitHub, and the README notes that the documentation pages show ads that help fund the project.…
Highlights
- Tooltips driven by data attributes
- Supports React 16.14 through React 19
- Works with Next.js Server Components
- Documented upgrade path from v4
- Open source
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 is react-tooltip?
A tooltip component for React, shown by adding data attributes to elements and including the tooltip component.
Which React versions does it support?
React 16.14 and newer through peer dependencies. The README says it is validated against React 19.
Do I need to import CSS?
Only for versions before 5.13.0, according to the README. Without it the tooltip will not show in those versions.
How does it work with Next.js?
The README says to render the tooltip from a client component, for example a small wrapper file marked with use client.
Why are there ads in the docs?
The README says ReactTooltip is open source and the ads are a way the community finances it.
Is it free?
Yes. It is open source and the code is on GitHub.
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
















