1. Reference
  2. Overlays

<menu-item>

One choice in a popup menu or dropdown: an icon, a label, and the action it runs.

Overlays
menu-item.ham
<row style="w-full items-center justify-between">
    <text style="font-bold">Quarterly report.pdf</text>
    <popup-menu icon="more_vert">
        <menu-item icon="edit"
                   value="rename">Rename</menu-item>
        <menu-item icon="share"
                   value="share">Share</menu-item>
        <menu-item icon="delete"
                   value="delete">Delete</menu-item>
    </popup-menu>
</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
icon Icon name
string
label Menu item text
string
value Value reported as $event.value on select (default: the text).
string

Events

NameWhat it does
action Statements / URL run when the item is picked (in a <popup-menu>).

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.