JavaScript tooltip libraries

Updated Nov 2026

JavaScript tooltip libraries show a small label or popover next to an element on hover or keyboard focus. A positioning engine keeps the floating element attached to its anchor as the page scrolls or resizes. These libraries let web apps explain icons, controls, and truncated text without crowding the layout.

Popularity

Floating UI DOM has the most monthly downloads in this comparison, at 525.8M.

LibraryMonthly downloadsStarsLast releaseLicense
@floating-ui/dom
539.0M
32.8KJul 2026MIT
@radix-ui/react-tooltip
272.6M
19.5KOct 2026MIT
Popper
123.1M
32.8KMay 2023MIT
Base UI
109.8M
11.5KOct 2026MIT
Material UI
53.7M
99.4KOct 2026MIT
React Aria Components
33.2M
16.1KOct 2026Apache-2.0
Tippy.js
33.0M
12.2KNov 2021MIT
Bootstrap
30.4M
175.1KNov 2026MIT
Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

Libraries and code examples

@floating-ui/dom

Provides positioning tools for anchored floating elements, including tooltips and popovers.

Downloads / mo
539.0M
Stars
32.8K
Last release
1.8.0
License
MIT

Strengths

  • Keeps floating elements anchored. Use autoUpdate to refresh positioning during scrolling and resizing.
  • Controls viewport collision behavior. Add flip to change placement when the tooltip overflows.

Limitations

  • DOM interactions need application code. Add the hover and focus handlers that show and hide tooltips.
  • Automatic updates need cleanup. Stop autoUpdate when the floating element is removed.

Quickstart

From computePosition.mdx
$ npm install @floating-ui/dom
import { computePosition } from "@floating-ui/dom";
const reference = document.getElementById("button");
const floating = document.getElementById("tooltip");
if (!reference || !floating) throw new Error("Missing host elements");
floating.style.position = "absolute";
const { x, y } = await computePosition(reference, floating);
Object.assign(floating.style, { left: `${x}px`, top: `${y}px` });

@floating-ui/dom examples

From open-source projects on GitHub

@radix-ui/react-tooltip

Shows information about an element when it receives keyboard focus or mouse hover.

Downloads / mo
272.6M
Stars
19.5K
Last release
1.4.1
License
MIT

Quickstart

From index.jsx
$ npm install @radix-ui/react-tooltip
import * as Tooltip from "@radix-ui/react-tooltip";
export default function App() {
  return <Tooltip.Provider><Tooltip.Root>
    <Tooltip.Trigger>Help</Tooltip.Trigger>
    <Tooltip.Portal><Tooltip.Content>Details</Tooltip.Content></Tooltip.Portal>
  </Tooltip.Root></Tooltip.Provider>;
}

@radix-ui/react-tooltip examples

From open-source projects on GitHub

Positions tooltip and popover elements next to reference elements.

Downloads / mo
123.1M
Stars
32.8K
Last release
2.11.8
License
MIT

Strengths

  • Flips overflowing tooltips. Change to the opposite placement when the preferred side cannot fit.
  • Tracks scrolling and resizing. The eventListeners modifier updates placement on scroll and resize.

Limitations

  • Is no longer maintained. Use Floating UI for new code; Popper remains relevant to existing integrations.
  • Lite omits collision modifiers. Import flip and preventOverflow explicitly when using Popper Lite.

Quickstart

From index.md
$ npm i @popperjs/core
import { createPopper } from "@popperjs/core";
const reference = document.getElementById("button");
const tooltip = document.getElementById("tooltip");
if (!reference || !tooltip) throw new Error("Missing host elements");
const instance = createPopper(reference, tooltip);

Popper examples

From open-source projects on GitHub

Provides unstyled React components and low-level hooks.

Downloads / mo
109.8M
Stars
11.5K
Last release
1.9.0
License
MIT

Quickstart

From index.tsx
$ npm install @base-ui/react
import { Tooltip } from "@base-ui/react/tooltip";
export default function App() {
  return <Tooltip.Provider><Tooltip.Root>
    <Tooltip.Trigger>Help</Tooltip.Trigger>
    <Tooltip.Portal><Tooltip.Positioner><Tooltip.Popup>Details</Tooltip.Popup></Tooltip.Positioner></Tooltip.Portal>
  </Tooltip.Root></Tooltip.Provider>;
}

Base UI examples

From open-source projects on GitHub

Material UI

Implements Google's Material Design as a React component library.

Downloads / mo
53.7M
Stars
99.4K
Last release
9.5.0
License
MIT

Quickstart

From BasicTooltip.tsx
$ npm install @mui/material @emotion/react @emotion/styled
import Tooltip from "@mui/material/Tooltip";
export default function App() {
  return <Tooltip title="Details"><button>Help</button></Tooltip>;
}

React Aria Components

Provides styleable React components built on React Aria.

Downloads / mo
33.2M
Stars
16.1K
Last release
1.22.1
License
Apache-2.0

Quickstart

From Tooltip.tsx
$ npm install react-aria-components
import { Button, Tooltip, TooltipTrigger } from "react-aria-components";
export default function App() {
  return <TooltipTrigger><Button>Help</Button><Tooltip>Details</Tooltip></TooltipTrigger>;
}

React Aria Components examples

From open-source projects on GitHub

Provides tooltip, popover, dropdown, and menu components.

Downloads / mo
33.0M
Stars
12.2K
Last release
6.3.7
License
MIT

Strengths

  • Includes hover and focus triggers. Mouse hover and keyboard focus both open tooltips by default.
  • Supports interactive tooltip content. Allow users to hover and click inside the tooltip.

Limitations

  • Custom popup placement needs care. Moving an interactive popup outside its parent requires focus management.
  • HTML content needs sanitizing. Sanitize user-supplied HTML before passing it as tooltip content.

Quickstart

From getting-started.mdx
$ npm i tippy.js
import tippy from "tippy.js";
import "tippy.js/dist/tippy.css";

tippy("#button", { content: "Details" });

Tippy.js examples

From open-source projects on GitHub

Provides a front-end framework for responsive, mobile-first web projects.

Downloads / mo
30.4M
Stars
175.1K
Last release
5.3.9
License
MIT

Quickstart

From tooltips.mdx
$ npm i --save bootstrap @popperjs/core
import { Tooltip } from "bootstrap";
import "bootstrap/dist/css/bootstrap.min.css";
const trigger = document.getElementById("button");
if (!trigger) throw new Error("Missing trigger");
const tooltip = new Tooltip(trigger, { title: "Details" });

Bootstrap examples

From open-source projects on GitHub

FAQ

Floating UI suits custom tooltips that need positioning only. Radix UI Tooltip suits React apps that want an accessible tooltip component. Tippy.js suits pages that want ready-made tooltips without a framework.

Radix UI Tooltip, Base UI, React Aria Components, and Material UI provide tooltip components for React. Floating UI also ships React hooks for custom tooltips.

Floating UI positions floating elements such as tooltips and popovers next to an anchor element. It is the successor to Popper.

Bootstrap tooltips are opt-in and start from JavaScript on elements that carry a tooltip data attribute. Bootstrap positions them with Popper.

Show the tooltip on keyboard focus as well as hover, and link it to its trigger with aria-describedby. Radix UI Tooltip and React Aria Components handle focus, dismissal, and ARIA attributes.

For coding agents

Found your tooltip library? Help your agent use it.

Connect Exa so your coding agent can find the library’s documentation, check its API, and look up implementations while you build.

Run in your terminal

claude plugin install exa@claude-plugins-official