Tooltip
Non-actionable UI element that only contains text and does not require the user to take action but serves only to inform the user before taking action, contextualizing an action or label/icon, but when used as a Popover, the element takes on a more persistent appearance and allows the user to take action on the content inside of the popover.
Anatomy
Legend
- Content bubble
- Beak
Options
Placement
There are a total of 12 placement options that can be used for both Popover and tooltips.
Hover to see: Top-Start
Hover to see: Top
Hover to see: Top-End
Hover to see: Left-Start
Hover to see: Left
Hover to see: Left-End
Hover to see: Right-Start
Hover to see: Right
Hover to see: Right-End
Hover to see: Bottom-Start
Hover to see: Bottom
Hover to see: Bottom-End
Offset
Both tooltips and popovers have optional offsets. The offset is defined by a set of 2 numbers [0,16]. The first number indicating the x offset and the 2nd indicating the y offset. Default offset is [0,8].
Without Offset
With Offset
asPopOver
When set as a popover, the beak will be hidden, shadow applied, and the trigger will require the user to click instead of over to reveal the content bubble.
Tooltip as popover
Tooltip
Themes
Three available themes for the tooltip & popover. They include light, dark and a subscription theme.
Light theme
Dark theme
Subs theme
Behavior
Overflow
Tooltips and popover have no inherent fixed size. The content inside will span the width of its parent container unless otherwise specified.
Hover or tap to see behavior
On Hover
Tooltips will be triggered on hover (tap for mobile) and will disappear if the user is no longer hovering over the element or the tooltip itself.
Hover or tap to see behavior
On Click
When used as a Popover, the trigger will be on click (tap for mobile) and will only disappear if the user clicks outside of the content bubble.
Click or tap to see behavior
Flip to fit
The tooltip/popover will flip from its original placement if there is not enough space to remain on screen. The tooltip/popover will no longer attempt to stay in view if the user scrolls beyond the trigger element.
Click or tap to see behavior
Usage guidelines
Nesting popovers
Nesting popovers may seem helpful as a trick to get content on the screen, but it is very hard for the user to navigate content this way.
Click or tap to see behavior
Mixing patterns
Tooltips should never nest a popover. Since the tooltip shows/hides on hover the precision required for the user to navigate the content becomes increasingly harder as patterns mix.
Hover
Abusing offset
Avoid setting the offset to close or to far from the trigger.
Hover
Hover
Pair with Button Icons
Giving user context with tooltips can be helpful way to inform of the Button Icon function.
Specs
Size
Tooltip takes up the full width of its parent container and full height of the content inside its bubble.
Component Checklist
Visual information required to identify components and states (except inactive components) has a contrast ratio to meet WCAG 2.0 level AA. This exclude text contrast requirements. Unless disabled text should always be accessbile.
Includes all interactive states that are applicable (hover, down, focus, keyboard focus, disabled).
Sizing, spacing, and other visual styles have been outline in documentation and the coded component has been VQA to match
Considerations have been made to think in darkmode, lightmode, button themes and other applicable themes
Includes relevant options (variant, style, size, orientation, optional iconography, decorations, selection, error state, etc.)
Includes guidelines for keyboard focus, layout (wrapping, truncation, overflow), animation, interactions, etc.
A equivalent design component as been created matching as best as possible to properties found in the coded component.
Component can scale for all platforms mobile, tablet, and desktop.
Component has an opinion on how it scales on Homepage columns and other modular layouts.
Component can be used in iOS and Andriod or has an equivalent app component
Follows WCAG 2.0 standards for keyboard accessibility guidelines and includes a description of the keyboard interactions.
All design attributes (color, typography, layout, animation, etc.) are available as design tokens.
Meets minimum requirements to ensure minimal impact to Web vitals. (Skeleton loads, Animations, Avoid layout shift, etc.)