Tooltip

The Tooltip component displays additional information when a user hovers or focuses on a trigger element.

Usage

Default


<Tooltip content="Tooltip message" position="top">
  <Button>Hover me</Button>
</Tooltip>

Props

Data table
TypeDescription
aria-labelstringAccessible label applied to the tooltip itself. Use when the tooltip needs an explicit accessible name.
aria-labelledbystringAccessible labelling reference for the tooltip itself.
childrenReactNodeThe element that triggers the tooltip.
contentstringThe content text displayed inside the tooltip.
data-testidstringOptional test ID for testing frameworks.
idstringOptional custom id for the tooltip element. If omitted, a stable generated id is used.
keepMountedWhenHiddenbooleanWhether the tooltip should remain in the accessibility tree when hidden. Defaults to false behavior via aria-hidden.
position"left" | "right" | "top" | "bottom"The position of the tooltip relative to the target element. "top" | "bottom" | "left" | "right"
roundingRoundingTypeRounding style of the tooltip. "none" | "small" | "medium" | "large" | "full"
shadowShadowTypeShadow style of the tooltip. "none" | "light" | "medium" | "strong" | "intense"
stateStateTypeState of the tooltip for visual feedback. "success" | "error" | "warning" | "disabled" | ""
themeThemeTypeTheme style of the tooltip. "primary" | "secondary" | "tertiary" | "quaternary" | "clear"
triggerAriaDescribedBystringAdditional describedby ids to keep on the trigger element alongside the tooltip id when visible.
triggerAriaLabelstringAccessible label applied to the trigger element. Helpful when the trigger has no visible text or icon-only content.
triggerAriaLabelledBystringAccessible labelledby reference applied to the trigger element.
triggerIdstringOptional id for the trigger element.