Skip to Content

Tooltip

A Tooltip is a small, informative pop-up that provides context, explanations, or additional details when a user hovers over or interacts with specific elements in a user interface.

Examples

Basic

Disabled

Custom Animation

Define custom animations for the tooltip, using the animation, animationViewChange props:

Learn more about how to customize the animations in the Custom Animations section.

Theme

This component uses the following default theme:

  • root{}(3 keys)
      Show all

Learn more about how to customize in the Theme documentation.

API

NameTypeDefault
childrenReactNode

Content to wrap.

closeOnClickboolean

Close on any click.

false
closeOnBodyClickboolean

Close when the body is clicked.

true
closeOnEscapeboolean

Close when escape key is triggered.

true
contentany

Content for the tooltip.

referenceany

Reference of the tooltip to align to.

placementPlacement

floating-ui placement.

'top'
enterDelaynumber

Delay before showing tooltip.

0
leaveDelaynumber

Delay before closing tooltip.

200
modifiersModifiers

floating-ui modifiers.

visibleboolean

External setter for visibility.

false
classNamestring

Additional CSS classnames.

triggerClassNamestring

CSS Classname for the tooltip container ( ie. the thing that the tooltip is bound to ).

triggerTriggerTypes | TriggerTypes[]

How the tooltip will be triggered.

'hover'
disabledboolean

Whether the tooltip is disabled.

false
animatedboolean

Deprecated: Use animation configuration instead. Whether the tooltip is animated.

true
animationMotionNodeAnimationOptions

Animation configuration for the tooltip.

followCursorboolean

Whether the tooltip should move with the cursor or not.

false
pointerEventsstring

Add pointer events or not. Usually not for tooltips.

'none'
arrowReactNode

Arrow pointing from the tooltip to the trigger element. Pass true to render the default arrow, or a ReactNode to render a custom arrow.

isPopoverboolean

Differentiator for popovers to be handled separate from tooltips

onOpen() => void

Tooltip was opened.

onClose() => void

Tooltip was closed.

themeTooltipTheme

Theme for the tooltip.

Last updated on