Tooltip
This component renders the tooltip content only. The hover/focus
trigger is {@attach tooltip(text)} from q-design-ui/attachments/tooltip; the component owns the look, the
attachment owns the behavior. Never use the native title attribute.
Strings
A string is the common case: one short hint. It is never parsed as HTML, so a name with markup in it is safe.
Snippets
A snippet carries inline markup where the hint needs emphasis.
A title and lines
tooltip({ title, lines }): the title in the label face,
each line under it smaller and quieter, all text. The trigger's description
reads them together, joined by ". ".
Length and width
Long content clamps to 3 lines by default, so no tooltip dominates the
viewport; maxLines changes the clamp. maxWidth narrows
the bubble for a tight spot.
Components
A component and its props, for content richer than text: metadata, a small chart, a status panel.
Examples
A short tooltip explanation.
A name like <b>x</b> & co is drawn as written.
Supports inline markup for emphasis or links.
3 notes
Agnes · 10:42
The gripper slips on the second grasp
A much longer tooltip that demonstrates the line-clamp behavior. By default it clamps to 3 lines but you can pass maxLines to change it. The default clamp prevents any single tooltip from dominating the viewport.
A much longer tooltip that demonstrates the line-clamp behavior, but with maxLines set to 1.
Constrained to 200px wide.
Component-shaped tooltip content. Useful when text isn't enough — e.g. to show metadata, a small chart, or a richer status panel.