When using Tooltip with IconButton, avoid repetitive labeling. The
accessibilityLabel provided to IconButton should describe the intent of the button, not the icon itself. For instance, use “Settings” instead of “Cog icon”. Tooltip
text can expand upon that intention, as seen with the
cog IconButton. If Tooltip
text and IconButton
accessibilityLabel contain the same content, pass an empty string to
accessibilityLabel, as seen with the
Tooltips must be paired with an interactive, focusable element, like Button or IconButton. They cannot be paired with anything disabled or static, because this prevents keyboard users from triggering Tooltip and consuming its content. To test if you’re using Tooltip properly, use your keyboard rather than your mouse to trigger Tooltip.
Be sure to localize the
accessibilityLabel props. Note that localization can lengthen text by 20 to 30 percent.
idealDirection to specify the preferred position of Tooltip relative to its anchor element. The default direction is "down", which should be used in most cases. The actual position may change given the available space around the anchor element.
Sugar-Free Strawberry-Chocolate Greek Yogurt Bark Three-Step Recipe.
link to display a link at the bottom of Tooltip.
⚠️ Note: this feature will soon be deprecated, as it is not accessible. Please do not use it in new designs or features.
Within scrolling containers
ScrollBoundaryContainer is needed for proper positioning when Tooltip is anchored to an element that is located within a scrolling container. The use of ScrollBoundaryContainer ensures Tooltip remains attached to its anchor when scrolling.
Popover displays a lightweight task related to the content on screen. One example of Popover is the board picker, which allows people to choose the board to save a Pin to. While Tooltips are purely text-based, Popovers offer broader content options, such as Buttons and Images.
ScrollBoundaryContainer is needed for proper positioning when Tooltip is anchored to an element that is located within a scrolling container. The use of ScrollBoundaryContainer ensures Tooltip remains attached to its anchor when scrolling. See the within scrolling containers variant to learn more.
Toast provides feedback on an interaction. One example of Toast is the confirmation that appears when a Pin has been saved. Toasts appear at the bottom of a desktop screen or top of a mobile screen, instead of being attached to any particular element on the interface.