1. Reference
  2. Display

<tooltip>

Wraps an element and shows a short help message on hover or long press.

Display
tooltip.ham
<row style="w-full gap-16 items-center">
    <tooltip message="Add to favorites">
        <icon name="favorite_border"
              style="size-lg"/>
    </tooltip>
    <tooltip message="Share this recipe">
        <icon name="share"
              style="size-lg"/>
    </tooltip>
    <text style="muted">Long-press an icon for its name</text>
</row>
The snippet drawn by Hype Apps on a phone, in light mode The snippet drawn by Hype Apps on a phone, in dark mode
This snippet as Hype Apps draws it on a phone. It follows this page's light or dark theme.

Attributes

NameWhat it doesDefault
message Tooltip text on hover/long press
string

Any tag also takes gestures: @on.tap, @on.longpress, @on.doubletap and @on.swipeleft (and right, up and down). @click runs on a tap too.

This page is also Markdown, and all of HAM is in llms.txt.