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
delayms, hides on leave - touch: long-press shows (the press is then not delivered as a tap to the trigger), releasing hides
| Prop | Type | Default | Description |
|---|---|---|---|
delay | number | 500 | hover delay in ms (pointer) |
adaptive | SparkAdaptiveSparkAdaptive = '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.
| Prop | Type | Default | Description |
|---|---|---|---|
text | ResourceStr | undefined | undefined | |
side | SparkSideSparkSide = 'top' | 'right' | 'bottom' | 'left' | 'top' | |
alignment | SparkAlignSparkAlign = 'start' | 'center' | 'end' | 'center' | |
sideOffset | number | 6 |
Slots: children (trailing closure)