Animate UI

Tooltip

A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.

Made by imskyleen
Edit on GitHub

Installation

Usage

<TooltipProvider>
  <Tooltip>
    <TooltipTrigger>Open tooltip</TooltipTrigger>
    <TooltipPortal>
      <TooltipContent>
        <p>Tooltip content</p>
      </TooltipContent>
    </TooltipPortal>
  </Tooltip>
</TooltipProvider>

API Reference

TooltipProvider

Radix UI API Reference - Tooltip.Provider

Tooltip

Radix UI API Reference - Tooltip.Root

TooltipTrigger

Radix UI API Reference - Tooltip.Trigger

TooltipPortal

Radix UI API Reference - Tooltip.Portal

The forceMount property is not supported in the TooltipPortal component, as it is used for animation.

TooltipContent

Radix UI API Reference - Tooltip.Content
PropTypeDefault
transition?
Transition
{ type: 'spring', stiffness: 300, damping: 25 }
...props?
HTMLMotionProps<"div">
-

The forceMount and asChild properties are not supported in the TooltipContent component, as it is used for animation.

TooltipArrow

Radix UI API Reference - Tooltip.Arrow

Credits

Built by Skyleen. The source code is available on GitHub.