Components
Tooltip

Tooltip

The Tooltip is a flexible and handy component that provides additional information when users hover over an element. It is perfect for scenarios where you need to offer users tips or help text.

API reference docs for the component. Learn about the props, CSS, and other APIs of this exported module.

TooltipProps

aria-label

string

Custom label for the tooltip.

closeDelay

number

The close delay of the tooltip.

closeOnEsc

boolean

Whether to close the tooltip when the Escape key is pressed.

closeOnPointerDown

boolean

Whether to close the tooltip on pointerdown.

disabled

boolean

Whether the tooltip is disabled

getRootNode

() => ShadowRoot | Node | Document

A root node to correctly resolve document in custom environments. E.x.: Iframes, Electron.

id

string

The `id` of the tooltip.

ids

Partial<{ trigger: string content: string arrow: string positioner: string }>

The ids of the elements in the tooltip. Useful for composition.

interactive

boolean

Whether the tooltip's content is interactive. In this mode, the tooltip will remain open when user hovers over the content.

onOpenChange

(details: OpenChangeDetails) => void

Function called when the tooltip is opened.

open

boolean

Whether the tooltip is open

openDelay

number

The open delay of the tooltip.

positioning

PositioningOptions

The user provided options used to position the popover content

TooltipContext

arrowProps

Dict<any>

arrowTipProps

Dict<any>

close

() => void

Function to close the tooltip.

contentProps

Dict<any>

isOpen

boolean

Whether the tooltip is open.

open

() => void

Function to open the tooltip.

positionerProps

Dict<any>

setPositioning

(options?: Partial<PositioningOptions> | undefined) => void

Function to reposition the popover

triggerProps

Dict<any>

TooltipContentProps

lazyMount

boolean

Whether to enable lazy mounting. Defaults to `false`.

onExitComplete

() => void

present

boolean

unmountOnExit

boolean

Whether to unmount on exit. Defaults to `false`.