# <tooltip>

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

Category: Display.

```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>
```

How Hype Apps draws it on a phone: [light](https://hypeapps.dev/img/tags/tooltip-light.webp), [dark](https://hypeapps.dev/img/tags/tooltip-dark.webp).

## Attributes

| Name | What it does | Default |
|---|---|---|
| `message` | Tooltip text on hover/long press |  |

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.

## Related tags

- [`<row>`](https://hypeapps.dev/docs/reference/row.md): Lays children side by side in one line; flex= shares the free space and align/cross position them.
- [`<icon>`](https://hypeapps.dev/docs/reference/icon.md): A Material Symbols icon, with its style, weight, size and color set in its name.
- [`<text>`](https://hypeapps.dev/docs/reference/text.md): A run of text; with @text it shows an expression that updates as its variables change.
- [`<ad>`](https://hypeapps.dev/docs/reference/ad.md): An ad slot in the page, filled with a banner from AdMob in a built app.
- [`<avatar>`](https://hypeapps.dev/docs/reference/avatar.md): A round avatar from a photo, initials or an icon, in any size and color.
- [`<badge>`](https://hypeapps.dev/docs/reference/badge.md): A small count or dot pinned to the corner of an icon or any other element.
- [`<canvas-tool>`](https://hypeapps.dev/docs/reference/canvas-tool.md): A drawing tool written in HAM and loaded into a draw pad as a plugin: touch handlers, state and options.
- [`<caption>`](https://hypeapps.dev/docs/reference/caption.md): A table caption, shown as a label above the table.

All tags: https://hypeapps.dev/docs/reference.md · The full reference: https://hypeapps.dev/llms.txt
