Skip to content

Tooltip ​

Shows information on hover (mouse / touchpad) or on long-press (touch). Flips to stay on screen.

Usage ​

Approximate web preview — the HarmonyOS rendering is the reference.

API ​

Extracted from the @Param / @Event / @BuilderParam declarations in the library sources.

STooltip ​

shadcn-vue Tooltip, built on the system popup (bindPopup: placement with flip, arrow, no mask), with semantic translation:

  • pointer: shows after hovering delay ms, hides on leave
  • touch: long-press shows (the press is then not delivered as a tap to the trigger), releasing hides
PropTypeDefaultDescription
delaynumber500hover delay in ms (pointer)
adaptiveSparkAdaptive
SparkAdaptive = 'auto' | 'pointer' | 'touch'
'auto''auto' follows the input modality; 'touch' disables hover, 'pointer' disables long-press

Slots: children (trailing closure)

STooltipTrigger ​

Slots: children (trailing closure)

STooltipContent ​

bg-primary text-primary-foreground rounded-md px-3 py-1.5 text-xs with an arrow; the system popup flips it to stay on screen.

PropTypeDefaultDescription
textResourceStr | undefinedundefined
sideSparkSide
SparkSide = 'top' | 'right' | 'bottom' | 'left'
'top'
alignmentSparkAlign
SparkAlign = 'start' | 'center' | 'end'
'center'
sideOffsetnumber6

Slots: children (trailing closure)

MIT Licensed