Tooltip — a hint that appears on hover or focus. The tooltip closes when the cursor is moved away, focus is removed, or the page is scrolled.
The tooltip size is determined by its content, but the component width cannot exceed 300px.
Sometimes it's more convenient if the text in the tooltip doesn't wrap and is displayed on a single line. For example, when comparing checksums, outputting email addresses, or file and folder paths. For such cases, don't limit the tooltip width.
Add a pointer arrow when it can be confusing which element the hint relates to.
In normal circumstances, the tooltip opens at the top centered. The position near the trigger element can be adjusted manually.
Choose a position where the tooltip won't cover content that the user will interact with next. For example, in a vertical list, open tooltips to the side so the hint doesn't interfere with viewing the neighboring element in the reading direction.
If there isn't enough space to display the tooltip, it will open on the opposite side. The kbqPlacementPriority attribute helps configure fallback positions if they need to differ from the default order.
When configuring kbqRelativeToPointer="true", the tooltip is positioned relative to the cursor. This is often needed for long strings (checksums, email, paths) so the hint appears right at the cursor.
When hovering over an element, the tooltip appears with a 0.4 second delay and disappears instantly.
When switching focus or hovering over another element with a tooltip, the delay works as follows:
If a certain button or function is unavailable, the tooltip can explain why.
For special cases, you can change the tooltip dimensions and place more than just text inside it. Use the Contrast-fade style, which is similar to the application background, to ensure content contrast against the tooltip background.