Skip to main content
OverflowingTextTooltipModeProvider sets how every OverflowingTextWithTooltip inside it handles its tooltip. It renders no DOM element.

Usage

Hover or focus the truncated label to read its full value. Change mode in the Storybook controls to compare when the tooltip is available.

Modes

  • measure-on-hover, the default without a provider, checks truncation on pointer entry and focus. A label that fits stays out of the way of a parent tooltip.
  • measure-on-open checks truncation when the tooltip tries to open. Use it for labels that mount under the pointer, such as a hover overlay, where no pointer entry happens.
  • disabled renders only the text, without any tooltip parts. Use it for many labels that a user cannot hover, such as content covered by an overlay.
Nested providers override the mode for their subtree.

Props

ReactNode
required
Content whose OverflowingTextWithTooltip instances use the mode.
"disabled" | "measure-on-hover" | "measure-on-open"
required
measure-on-hover checks truncation on pointer entry and focus. measure-on-open checks it when the tooltip tries to open. disabled renders only the text.