# JavaScript tooltip libraries

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

| Library | Monthly downloads | Stars | Last release | License |
| --- | --- | --- | --- | --- |
| [@floating-ui/dom](#floating-ui-dom) | 539.0M | 32.8K | Jul 2026 | MIT |
| [@radix-ui/react-tooltip](#radix-ui-react-tooltip) | 272.6M | 19.5K | Oct 2026 | MIT |
| [Popper](#popper) | 123.1M | 32.8K | May 2023 | MIT |
| [Base UI](#base-ui-react) | 109.8M | 11.5K | Oct 2026 | MIT |
| [Material UI](#mui-material) | 53.7M | 99.4K | Oct 2026 | MIT |
| [React Aria Components](#react-aria-components) | 33.2M | 16.1K | Oct 2026 | Apache-2.0 |
| [Tippy.js](#tippy-js) | 33.0M | 12.2K | Nov 2021 | MIT |
| [Bootstrap](#bootstrap) | 30.4M | 175.1K | Nov 2026 | MIT |

Downloads: npm, last thirty days. Stars and releases: GitHub. Amber: no release in over a year.

[Floating UI DOM](#floating-ui-dom) has the most monthly downloads in this comparison, at 525.8M.

## Capabilities

| Library | Focus-triggered UI | Virtual anchors |
| --- | --- | --- |
| [@floating-ui/dom](#floating-ui-dom) | No | Yes |
| [@radix-ui/react-tooltip](#radix-ui-react-tooltip) | Yes | No |
| [Popper](#popper) | No | Yes |
| [Base UI](#base-ui-react) | Yes | Yes |
| [Material UI](#mui-material) | Yes | Yes |
| [React Aria Components](#react-aria-components) | Yes | No |
| [Tippy.js](#tippy-js) | Yes | Yes |
| [Bootstrap](#bootstrap) | Yes | No |

## Libraries

### @floating-ui/dom

[GitHub](https://github.com/floating-ui/floating-ui) · [npm](https://www.npmjs.com/package/@floating-ui/dom) · [Docs](https://floating-ui.com/docs/)

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
- Capabilities: [From the @floating-ui/dom docs](https://floating-ui.com/docs/)

**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.

**Watch out for**

- **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.

```sh
npm install @floating-ui/dom
```

**Milkdown/milkdown** (12.1K stars)

[Milkdown/milkdown](https://github.com/Milkdown/milkdown) 

```javascript
(reference: VirtualElement) => {
    computePosition(reference, this.element, {
      placement: this.#floatingUIOptions.placement ?? 'top',
      middleware: [
        flip(),
        offset(this.#offset),
        shift(this.#shift),
        ...this.#middleware,
      ],
      ...this.#floatingUIOptions,
    })
      .then(({ x, y }) => {
        Object.assign(this.element.style, {
          left: `${x}px`,
          top: `${y}px`,
        })
      })
      .catch(console.error)
  }

```

[packages/plugins/plugin-tooltip/src/tooltip-provider.ts](https://github.com/Milkdown/milkdown/blob/68277b1a361ade2ba09996a623a4f4cb69d9b821/packages/plugins/plugin-tooltip/src/tooltip-provider.ts#L108-L126) · [More projects using @floating-ui/dom →](https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20using%20%40floating-ui/dom%20for%20tooltip%20positioning%2C%20dynamic%20content%2C%20collision%20handling%20and%20lifecycle%20cleanup&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
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` });

```

From [computePosition.mdx](https://github.com/floating-ui/floating-ui/blob/master/website/pages/docs/computePosition.mdx)

### @radix-ui/react-tooltip

[GitHub](https://github.com/radix-ui/primitives) · [npm](https://www.npmjs.com/package/@radix-ui/react-tooltip) · [Docs](https://www.radix-ui.com/primitives/docs/components/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
- Capabilities: [From the @radix-ui/react-tooltip docs](https://www.radix-ui.com/primitives/docs/components/tooltip)

```sh
npm install @radix-ui/react-tooltip
```

**calcom/cal.diy** (50.2K stars)

[calcom/cal.diy](https://github.com/calcom/cal.diy) 

```jsx
export function Tooltip({
  children,
  content,
  open,
  defaultOpen,
  onOpenChange,
  delayDuration,
  side = "top",
  ...props
}: {
  children: React.ReactNode;
  content: React.ReactNode;
  delayDuration?: number;
  open?: boolean;
  defaultOpen?: boolean;
  side?: "top" | "right" | "bottom" | "left";
  onOpenChange?: (open: boolean) => void;
} & TooltipPrimitive.TooltipContentProps) {
  const Content = (
    <TooltipPrimitive.Content
      {...props}
      className={classNames(
        "calcom-tooltip",
        side === "top" && "-mt-7",
        side === "left" && "mr-2",
        side === "right" && "ml-2",
        "bg-inverted text-inverted relative z-50 rounded-sm px-2 py-1 text-xs font-semibold shadow-lg",
        props.className && `${props.className}`
      )}
      side={side}
      align="center">
      {content}
    </TooltipPrimitive.Content>
  );

  if (content === undefined || content === null || content === "") return <>{children}</>;

  const trigger = React.isValidElement(children) ? children : <span>{children}</span>;

  return (
    <TooltipPrimitive.Root
      delayDuration={delayDuration || 50}
      open={open}
      defaultOpen={defaultOpen}
      onOpenChange={onOpenChange}>
      <TooltipPrimitive.Trigger asChild>{trigger}</TooltipPrimitive.Trigger>
      <TooltipPrimitive.Portal>{Content}</TooltipPrimitive.Portal>
    </TooltipPrimitive.Root>
  );
}

```

[packages/ui/components/tooltip/Tooltip.tsx](https://github.com/calcom/cal.com/blob/ae027bb70e694e2d2c44569f398d6cbcee0389b1/packages/ui/components/tooltip/Tooltip.tsx#L7-L56) · [More projects using @radix-ui/react-tooltip →](https://dashboard.exa.ai/playground/search?q=%40radix-ui/react-tooltip%20GitHub%20projects)

**Quickstart**

```jsx
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>;
}

```

From [index.jsx](https://www.radix-ui.com/primitives/docs/components/tooltip)

### Popper

[GitHub](https://github.com/floating-ui/floating-ui) · [npm](https://www.npmjs.com/package/@popperjs/core) · [Docs](https://popper.js.org/docs/v2/)

Positions tooltip and popover elements next to reference elements.

- Downloads / mo: 123.1M
- Stars: 32.8K
- Last release: 2.11.8
- License: MIT
- Capabilities: [From the Popper docs](https://popper.js.org/docs/v2/)

**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.

**Watch out for**

- **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.

```sh
npm i @popperjs/core
```

**element-plus/element-plus** (27.9K stars)

[element-plus/element-plus](https://github.com/element-plus/element-plus) 

```javascript
export const usePopper = (
  referenceElementRef: Ref<ReferenceElement>,
  popperElementRef: Ref<ElementType>,
  opts: Ref<PartialOptions> | PartialOptions = {} as PartialOptions
) => {
  const stateUpdater = {
    name: 'updateState',
    enabled: true,
    phase: 'write',
    fn: ({ state }) => {
      const derivedState = deriveState(state)

      Object.assign(states.value, derivedState)
    },
    requires: ['computeStyles'],
  } as Modifier<'updateState', any>

  const options = computed<Options>(() => {
    const { onFirstUpdate, placement, strategy, modifiers } = unref(opts)

    return {
      onFirstUpdate,
      placement: placement || 'bottom',
      strategy: strategy || 'absolute',
      modifiers: [
        ...(modifiers || []),
        stateUpdater,
        { name: 'applyStyles', enabled: false },
      ],
    }
  })

  const instanceRef = shallowRef<Instance | undefined>()
  const states = ref<Pick<State, 'styles' | 'attributes'>>({
    styles: {
      popper: {
        position: unref(options).strategy,
        left: '0',
        top: '0',
      },
      arrow: {
        position: 'absolute',
      },
    },
    attributes: {},
  })

  const destroy = () => {
    if (!instanceRef.value) return

    instanceRef.value.destroy()
    instanceRef.value = undefined
  }

  watch(
    options,
    (newOptions) => {
      const instance = unref(instanceRef)
      if (instance) {
        instance.setOptions(newOptions)
      }
    },
    {
      deep: true,
    }
  )

  watch(
    [referenceElementRef, popperElementRef],
    ([referenceElement, popperElement]) => {
      destroy()
      if (!referenceElement || !popperElement) return

      instanceRef.value = createPopper(
        referenceElement,
        popperElement,
        unref(options)
      )
    }
  )

  onBeforeUnmount(() => {
    destroy()
  })

  return {
    state: computed(() => ({ ...(unref(instanceRef)?.state || {}) })),
    styles: computed(() => unref(states).styles),
    attributes: computed(() => unref(states).attributes),
    update: () => unref(instanceRef)?.update(),
    forceUpdate: () => unref(instanceRef)?.forceUpdate(),
    // Preventing end users from modifying the instance.
    instanceRef: computed(() => unref(instanceRef)),
  }
}

```

[packages/hooks/use-popper/index.ts](https://github.com/element-plus/element-plus/blob/7c16480bcdbde9a91a1d818e716f0aac65ae4e25/packages/hooks/use-popper/index.ts#L18-L112) · [More projects using Popper →](https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20using%20%40popperjs/core%20for%20tooltip%20positioning%2C%20dynamic%20content%2C%20collision%20handling%20and%20lifecycle%20cleanup&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
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);

```

From [index.md](https://github.com/floating-ui/popper.js.org/blob/master/src/pages/docs/v2/tutorial.mdx)

### Base UI

[GitHub](https://github.com/mui/base-ui) · [npm](https://www.npmjs.com/package/@base-ui/react) · [Docs](https://base-ui.com/react/components/tooltip)

Provides unstyled React components and low-level hooks.

- Downloads / mo: 109.8M
- Stars: 11.5K
- Last release: 1.9.0
- License: MIT
- Capabilities: [From the Base UI docs](https://base-ui.com/react/components/tooltip)

```sh
npm install @base-ui/react
```

**shadcn-ui/ui** (128.5K stars)

[shadcn-ui/ui](https://github.com/shadcn-ui/ui) 

```jsx
function TooltipContent({
  className,
  side = "top",
  sideOffset = 4,
  align = "center",
  alignOffset = 0,
  children,
  ...props
}: TooltipPrimitive.Popup.Props &
  Pick<
    TooltipPrimitive.Positioner.Props,
    "align" | "alignOffset" | "side" | "sideOffset"
  >) {
  return (
    <TooltipPrimitive.Portal>
      <TooltipPrimitive.Positioner
        align={align}
        alignOffset={alignOffset}
        side={side}
        sideOffset={sideOffset}
        className="isolate z-50"
      >
        <TooltipPrimitive.Popup
          data-slot="tooltip-content"
          className={cn(
            "cn-tooltip-content cn-tooltip-content-logical z-50 w-fit max-w-xs origin-(--transform-origin) bg-foreground text-background",
            className
          )}
          {...props}
        >
          {children}
          <TooltipPrimitive.Arrow className="cn-tooltip-arrow cn-tooltip-arrow-logical z-50 bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5" />
        </TooltipPrimitive.Popup>
      </TooltipPrimitive.Positioner>
    </TooltipPrimitive.Portal>
  )
}

```

[apps/v4/registry/bases/base/ui/tooltip.tsx](https://github.com/shadcn-ui/ui/blob/968d8cb9dc42ae5d52e8fd356cf84596ec832a26/apps/v4/registry/bases/base/ui/tooltip.tsx#L27-L63) · [More projects using Base UI →](https://dashboard.exa.ai/playground/search?q=%40base-ui/react%20GitHub%20projects)

**Quickstart**

```jsx
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>;
}

```

From [index.tsx](https://base-ui.com/react/components/tooltip)

### Material UI

[GitHub](https://github.com/mui/material-ui) · [npm](https://www.npmjs.com/package/@mui/material) · [Docs](https://mui.com/material-ui/react-tooltip/)

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

- Downloads / mo: 53.7M
- Stars: 99.4K
- Last release: 9.5.0
- License: MIT
- Capabilities: [From the Material UI docs](https://mui.com/material-ui/react-tooltip/)

```sh
npm install @mui/material @emotion/react @emotion/styled
```

**Quickstart**

```jsx
import Tooltip from "@mui/material/Tooltip";
export default function App() {
  return <Tooltip title="Details"><button>Help</button></Tooltip>;
}

```

From [BasicTooltip.tsx](https://github.com/mui/material-ui/blob/master/docs/data/material/components/tooltips/demos/basic/BasicTooltip.tsx) · [Find projects using Material UI →](https://dashboard.exa.ai/playground/search?q=%40mui/material%20GitHub%20projects)

### React Aria Components

[GitHub](https://github.com/adobe/react-spectrum) · [npm](https://www.npmjs.com/package/react-aria-components) · [Docs](https://react-spectrum.adobe.com/react-aria/Tooltip.html)

Provides styleable React components built on React Aria.

- Downloads / mo: 33.2M
- Stars: 16.1K
- Last release: 1.22.1
- License: Apache-2.0
- Capabilities: [From the React Aria Components docs](https://react-spectrum.adobe.com/react-aria/Tooltip.html)

```sh
npm install react-aria-components
```

**actualbudget/actual** (30.4K stars)

[actualbudget/actual](https://github.com/actualbudget/actual) 

```jsx
export const Tooltip = ({
  children,
  content,
  triggerProps = {},
  disablePointerEvents = false,
  ...props
}: TooltipProps) => {
  const triggerRef = useRef(null);
  const [isHovered, setIsHover] = useState(false);

  const hoverTimeoutRef = useRef<ReturnType<typeof setTimeout>>(null);
  const closeTimeoutRef = useRef<ReturnType<typeof setTimeout>>(null);

  const handlePointerEnter = useCallback(() => {
    if (closeTimeoutRef.current) {
      clearTimeout(closeTimeoutRef.current);
    }

    const timeout = setTimeout(() => {
      setIsHover(true);
    }, triggerProps.delay ?? 300);

    hoverTimeoutRef.current = timeout;
  }, [triggerProps.delay]);

  const handlePointerLeave = useCallback(() => {
    if (hoverTimeoutRef.current) {
      clearTimeout(hoverTimeoutRef.current);
    }

    closeTimeoutRef.current = setTimeout(() => {
      setIsHover(false);
    }, triggerProps.closeDelay ?? 0);
  }, [triggerProps.closeDelay]);

  // Force closing the tooltip whenever the disablement state changes
  useEffect(() => {
    setIsHover(false);
  }, [triggerProps.isDisabled]);

  return (
    <View
      style={{ minHeight: 'auto', flexShrink: 0, maxWidth: '100%' }}
      ref={triggerRef}
      onMouseEnter={handlePointerEnter}
      onMouseLeave={handlePointerLeave}
    >
      <TooltipTrigger
        isOpen={isHovered && !triggerProps.isDisabled}
        {...triggerProps}
      >
        {children}

        <AriaTooltip
          triggerRef={triggerRef}
          style={{
            ...styles.tooltip,
            ...(disablePointerEvents && { pointerEvents: 'none' }),
          }}
          {...props}
        >
          {content}
        </AriaTooltip>
      </TooltipTrigger>
    </View>
  );
};

```

[packages/component-library/src/Tooltip.tsx](https://github.com/actualbudget/actual/blob/1a016ddbb0ad0de4fb85aba48d0b5871d3ae1cd6/packages/component-library/src/Tooltip.tsx#L15-L81) · [More projects using React Aria Components →](https://dashboard.exa.ai/playground/search?q=react-aria-components%20GitHub%20projects)

**Quickstart**

```jsx
import { Button, Tooltip, TooltipTrigger } from "react-aria-components";
export default function App() {
  return <TooltipTrigger><Button>Help</Button><Tooltip>Details</Tooltip></TooltipTrigger>;
}

```

From [Tooltip.tsx](https://react-spectrum.adobe.com/react-aria/Tooltip.html)

### Tippy.js

[GitHub](https://github.com/atomiks/tippyjs) · [npm](https://www.npmjs.com/package/tippy.js) · [Docs](https://atomiks.github.io/tippyjs/v6/)

Provides tooltip, popover, dropdown, and menu components.

- Downloads / mo: 33.0M
- Stars: 12.2K
- Last release: 6.3.7
- License: MIT
- Capabilities: [From the Tippy.js docs](https://atomiks.github.io/tippyjs/v6/)

**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.

**Watch out for**

- **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.

```sh
npm i tippy.js
```

**go-gitea/gitea** (59.1K stars)

[go-gitea/gitea](https://github.com/go-gitea/gitea) 

```javascript
export function showTemporaryTooltip(target: Element, content: Content): void {
  // if the target is inside a dropdown or tippy popup, the menu will be hidden soon
  // so display the tooltip on the "aria-controls" element or dropdown instead
  let refClientRect: DOMRect | undefined;
  const popupTippyId = target.closest(`[data-tippy-root]`)?.id;
  if (popupTippyId) {
    // for example, the "Copy Permalink" button in the "File View" page for the selected lines
    target = document.body;
    refClientRect = document.querySelector(`[aria-controls="${CSS.escape(popupTippyId)}"]`)?.getBoundingClientRect();
    refClientRect = refClientRect ?? new DOMRect(0, 0, 0, 0); // fallback to empty rect if not found, tippy doesn't accept null
  } else {
    // for example, the "Copy Link" button in the issue header dropdown menu
    target = target.closest('.ui.dropdown') ?? target;
    refClientRect = target.getBoundingClientRect();
  }
  const tooltipTippy = target._tippy ?? attachTooltip(target, content);
  tooltipTippy.setContent(content);
  tooltipTippy.setProps({getReferenceClientRect: () => refClientRect});
  if (!tooltipTippy.state.isShown) tooltipTippy.show();

  tooltipTippy.setProps({
    onHidden: (tippy) => {
      // reset the default tooltip content, if no default, then this temporary tooltip could be destroyed
      if (!attachTooltip(target)) {
        tippy.destroy();
      }
    },
  });

  // on elements where the tooltip is re-located like "Copy Link" inside fomantic dropdowns, tippy.js gets
  // no `mouseout` event and the tooltip stays visible, hide it with timeout.
  if (!popupTippyId) {
    setTimeout(() => {
      if (tooltipTippy.state.isVisible) tooltipTippy.hide();
    }, 1500);
  }
}

```

[web_src/js/modules/tippy.ts](https://github.com/go-gitea/gitea/blob/edd0c0e2cee34e5c13d563ceef83fe65c0e1d089/web_src/js/modules/tippy.ts#L280-L316) · [More projects using Tippy.js →](https://dashboard.exa.ai/playground/search?q=JavaScript%20projects%20using%20tippy.js%20for%20tooltip%20positioning%2C%20dynamic%20content%2C%20collision%20handling%20and%20lifecycle%20cleanup&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D)

**Quickstart**

```javascript
import tippy from "tippy.js";
import "tippy.js/dist/tippy.css";

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

```

From [getting-started.mdx](https://atomiks.github.io/tippyjs/v6/all-props/)

### Bootstrap

[GitHub](https://github.com/twbs/bootstrap) · [npm](https://www.npmjs.com/package/bootstrap) · [Docs](https://getbootstrap.com/docs/5.3/components/tooltips/)

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
- Capabilities: [From the Bootstrap docs](https://getbootstrap.com/docs/5.3/components/tooltips/)

```sh
npm i --save bootstrap @popperjs/core
```

**phpmyadmin/phpmyadmin** (8.0K stars)

[phpmyadmin/phpmyadmin](https://github.com/phpmyadmin/phpmyadmin) 

```javascript
export function showHints ($div: JQuery<HTMLElement> | undefined = undefined) {
    if ($('#no_hint').length > 0) {
        return;
    }

    let $newDiv = $div;
    if ($newDiv === undefined || ! ($newDiv instanceof $) || $newDiv.length === 0) {
        $newDiv = $('body');
    }

    $newDiv.get(0).querySelectorAll('.pma_hint').forEach((hintElement: HTMLElement): void => {
        const content = hintElement.querySelector('span').textContent;
        bootstrap.Tooltip.getOrCreateInstance(hintElement, { title: content })
            .setContent({ '.tooltip-inner': content });
    });
}

```

[resources/js/modules/functions.ts](https://github.com/phpmyadmin/phpmyadmin/blob/d35ebc6d0671e19f1d40bd40e5a8806775d6f3d9/resources/js/modules/functions.ts#L2888-L2903) · [More projects using Bootstrap →](https://dashboard.exa.ai/playground/search?q=bootstrap%20GitHub%20projects)

**Quickstart**

```javascript
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" });

```

From [tooltips.mdx](https://getbootstrap.com/docs/5.3/components/tooltips/)

## FAQ

### Which JavaScript tooltip library should I use?

[Floating UI](#floating-ui-dom) suits custom tooltips that need positioning only. [Radix UI Tooltip](#radix-ui-react-tooltip) suits React apps that want an accessible tooltip component. [Tippy.js](#tippy-js) suits pages that want ready-made tooltips without a framework.

### How do I add a tooltip in React?

[Radix UI Tooltip](#radix-ui-react-tooltip), [Base UI](#base-ui-react), [React Aria Components](#react-aria-components), and [Material UI](#mui-material) provide tooltip components for React. Floating UI also ships React hooks for custom tooltips.

### What is Floating UI?

[Floating UI](#floating-ui-dom) positions floating elements such as tooltips and popovers next to an anchor element. It is the successor to [Popper](#popper).

### How do Bootstrap tooltips work?

[Bootstrap](#bootstrap) tooltips are opt-in and start from JavaScript on elements that carry a tooltip data attribute. Bootstrap positions them with Popper.

### How do I make tooltips accessible?

Show the tooltip on keyboard focus as well as hover, and link it to its trigger with aria-describedby. [Radix UI Tooltip](#radix-ui-react-tooltip) and [React Aria Components](#react-aria-components) handle focus, dismissal, and ARIA attributes.

## How this page was built

Data checked Nov 20, 2026.

Reproduce it with the Exa API:

```json
{
  "endpoint": "/search",
  "body": {
    "query": "Best JavaScript tooltip libraries Tippy Floating UI Popper Tooltipster examples",
    "numResults": 5
  }
}
```

Docs: https://exa.ai/docs/reference/search
