# <overlay>

Inside a drawing tool written in HAM, the paths the tool draws over the pad, like a lasso's outline.

Category: Display.

```ham
<draw-tool name="lasso"
           label="Lasso"
           icon="gesture"
           cursor="crosshair"
           @on.touch.start="$tool.points = $event.doc_x + ',' + $event.doc_y"
           @on.touch.move="$tool.points = $tool.points + ' ' + $event.doc_x + ',' + $event.doc_y"
           @on.touch.end="#pad.select.path:$tool.points; $tool.points = ''">
    <state points=""/>
    <overlay>
        <path in="$pad"
              points="$tool.points"
              closed="true"
              stroke="#FFFFFF"
              dash="6 4"/>
    </overlay>
</draw-tool>
```

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

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

- [`<state>`](https://hypeapps.dev/docs/reference/state.md): Declares a draw tool's own variables and starting values, read and written as $tool.* by its handlers.
- [`<path>`](https://hypeapps.dev/docs/reference/path.md): A vector shape from points or SVG-like path data, stroked, filled or dashed.
- [`<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.
- [`<carousel>`](https://hypeapps.dev/docs/reference/carousel.md): Swipeable pages side by side, one at a time, with dots below that show which page is on screen.

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