Tooltip
A popup that displays information related to an element when hovered or focused.
Positions
Use the
side
prop to control where the tooltip appears.
Auto Position
Use
side="auto"
for dynamic positioning that adjusts based on viewport boundaries.
On Icons
Tooltips are commonly used with icon buttons to provide context.
Alignment
Use the
align
prop to control tooltip alignment.
With Keyboard Shortcut
Combine tooltip text with keyboard shortcuts.
Accessibility
Tooltips are triggered by both mouse hover and keyboard focus, making them accessible to keyboard users. However, critical information should not be placed solely in tooltips as they may not be accessible to all users.
<.tooltip id="help-tooltip" tooltip="Additional help text">
<.button>Help</.button>
</.tooltip>