Tooltip

Popup overlay that shows supplementary details on element hover.

The Tooltip primitive provides accessible, keyboard-aware helper label overlays that appear on mouse hover or element focus.

Quick StartLink

Wrap an interactive element to attach a hover/focus description helper bubble:

tsx
import { Tooltip, Button } from 'boltdocs/primitives'

export default function App() {
  return (
    <Tooltip content="Permanently delete the project metadata files" delay={300}>
      <Button className="px-4 py-2 bg-red-600 text-white rounded-lg hover:bg-red-700">
        Delete Repository
      </Button>
    </Tooltip>
  )
}

Composable SubcomponentsLink

If you need full control over the trigger flow lifecycle, you can compose tooltips using the nested components:

ComponentHTML TagDescriptionProps
Tooltip.Root / TooltipWrapperAuto-trigger wrapper handling hover delays and states.Tooltip Props
Tooltip.Content<div>Floating container rendering the tooltip description box and overlay arrow.TooltipContent Props

Component PropsLink

Tooltip PropsLink

PropertyTypeDefaultDescription
contentReactNodeRequiredThe text or graphic content to render inside the popup tooltip.
childrenReactElementRequiredThe interactive trigger target element (must support hover/focus event hooks).
delaynumber500Hover delay duration in milliseconds before the tooltip appears with transition.
closeDelaynumber0Delay duration in milliseconds before the tooltip disappears on mouse leave.
placement'bottom' | 'top' | 'left' | 'right''top'Preferred alignment positioning side.

Tooltip.Content PropsLink

Inherits the standard React Aria TooltipProps properties:

PropertyTypeDefaultDescription
classNamestringundefinedCustom utility CSS class overrides.
styleCSSPropertiesundefinedInline style overrides.

Customization & statesLink

Tooltip wraps React Aria's Tooltip. The trigger (Tooltip.Root / Tooltip) only owns behavior — hover delays, placement, and open/close. All visuals belong to the theme through Tooltip.Content's className (a plain string or a render function receiving the placement), and RAC mirrors the animation and placement states onto the content as data-* attributes.

State / SlotMechanism
Tooltip.Content classNameString passthrough (or function receiving { placement, isEntering, isExiting })
data-entering / data-exitingPresent during open/close — use data-entering: / data-exiting: animation variants
data-placementtop / bottom / left / right — placement-aware offsets via data-[placement=top]:
Tooltip propsdelay, closeDelay, placement — behavior only
OverlayArrowThemed arrow rendered inside Tooltip.Content

Tailwind v4:

tsx
<Tooltip.Root>
  <Button className="px-4 py-2 rounded-lg bg-primary-500 text-white">
    Hover me
  </Button>
  <Tooltip.Content className="data-entering:animate-in data-entering:fade-in data-entering:zoom-in-95
                              data-[placement=top]:slide-in-from-bottom-1
                              rounded-md bg-surface text-body ring-1 ring-subtle px-2.5 py-1.5">
    Helpful detail
  </Tooltip.Content>
</Tooltip.Root>
Last updated on October 18, 2026

Was this page helpful?