Do tooltips work on mobile?
Tooltips aren't just for web—they're one of the most popular and effective UI patterns for mobile apps, too.
How do you display a tooltip?
Basic Tooltip
HTML: Use a container element (like <div>) and add the "tooltip" class to it. When the user mouse over this <div>, it will show the tooltip text. The tooltip text is placed inside an inline element (like <span>) with .
Should tooltips be clicked or hover?
Support both mouse and keyboard hover.
Tooltips that appear only on mouse hover are inaccessible for users that rely on keyboards to navigate. Be inclusive in your design and ensure that your tooltips are accessible via keyboards.