Skip to content
PixiKit

Tooltip

A short label for an element. It opens on hover and keyboard focus, waits a beat the first time and not between neighbours, and closes on Escape, leave and blur.

pixikit.com/docs/components/tooltip

Customize

Placement
Delay400ms
Offset8px
Portal
Disabled

Props

9
NameTypeDefaultDescription
contentstringRequiredThe text shown in the tooltip.
childrenReactElementRequiredThe one element the tooltip describes. It gets the hover and focus handlers and aria-describedby.
placementPlacement"top"Where the tooltip sits around the element; it flips when there is no room.
delaynumber400Milliseconds to wait before showing on hover; no wait when another tooltip was open in the last 300ms.
offsetnumber8Gap in px between the element and the tooltip.
shortcutstringNoneA key hint shown after the text, such as `Ctrl K`.
portalbooleantrueRenders the tooltip in a portal on the page body; turn off to keep it inline.
classNamestringNoneExtra classes for the tooltip.
disabledbooleanfalseTurns the tooltip off; the element stays mounted and nothing shows.

More interaction components in Pro

View all

Related