Usage

Props

NameTypeRequiredDefaultDescription
children
ReactNode
false
className
string
false

Additional classNames

hideDelay
number
false
since

10.19.0

initialIsVisible
boolean
false

Whether to show the overlay on initial render

since

10.19.0

overlay
any
false

The tip we want to display

since

10.19.0

placement
Placement
false

Determines the position of the arrow

since

10.19.0

showDelay
number
false
since

10.19.0

style
CSSProperties
false

Additional CSS styles

trigger
TriggerVariant | TriggerVariant[]
false

The event to trigger the overlay

since

10.19.0

The Tooltip component wraps an element that will trigger a tooltip. An element that will result in an HTML element (not a string) is required, as this node will have the attached event listeners. To facilitate stacking context, a Tooltip should have one ZIndexProvider somewhere above in its tree.

overlay

If it is necessary to customize the content inside of the overlay, place your string and components inside a Tooltip.Content.

placement

Tooltip.Content

NameTypeRequiredDefaultDescription
children
ReactNode
false
className
string
false

Additional classNames

placement
Placement
false
since

10.19.0

style
CSSProperties
false

Additional CSS styles

Advanced

Render Prop

If your tooltip trigger needs to know the state of the tooltip, Tooltip accepts a function as children.

Disabled Inputs

Depending on the browser, disabled HTML inputs might not fire an event. Adding a span between the Tooltip and the input will allow a tooltip to appear on a disabled element.

Without span:

With span: