Menu
A pull-down menu that grows out of the button that opens it, in Liquid Glass on iOS 26 and a Material 3 menu on Android.
Installation
Usage
uiMenuTriggermarks the element that opens the menu. A tap on it opens and closes it. Anything can be the trigger: a glass button, as here, a Button, or your own view.- Everything else inside
<ui-menu>is the menu:<ui-menu-item>,<ui-menu-section>,<ui-menu-separator>and<ui-menu-submenu>. - On iOS, press the trigger and slide onto an item to choose it. The menu opens as the finger touches down, as UIKit's pull-down menus do, and lifting on an item chooses it. Lifting without sliding leaves the menu open for a tap. On Android it opens on the tap, as Material's menus do.
- Choosing an item emits its
pressed, then closes the menu. A tap outside the menu, or Android's back button, closes it without choosing. - It stays on screen and inside the safe area. Near the bottom of the screen it opens upward, and in the right half it lines up with the trigger's right edge. Opening upward on iOS, it lists its items from the bottom up, so the first is nearest the finger, as UIKit's menus do (a section keeps its title above its items). Android keeps the order.
[(open)]opens and closes it from code, as with Dialog.
What each platform draws
On iOS the menu is one glass shape whose frame grows from the trigger's to the menu's, and the trigger hides under it meanwhile. Liquid Glass follows a shape as it moves and resizes, so the trigger seems to open into the menu. A trigger that's glass itself (<blur-view ui-glass uiMenuTrigger>) hands its glass over to the menu on iOS 26, in the app ng build --platform ios builds: the menu takes over its corners, and its icon fades out as the menu grows, and back in as it closes (see Glass).
Items
labelis the item's text, and what a screen reader reads.icontakes a name from the icon set. Give icons to common actions, such as share, copy and delete.svgtakes your own icon's markup instead, for an action the set has nothing for, such as opening your app's other product:<ui-menu-item label="Open in Acme" [svg]="acmeMark" />.currentColorin it takes the item's color, red on a destructive item, and colors written out stay.xmlnsis optional, and lines must be<path>s, as for an icon's own SVG. Giveiconorsvg, not both.variant="destructive"colors the item red, for actions that delete or can't be undone.disabledshows the item, faded, without letting it be chosen.
Check marks
checked shows a checkmark, for an option that's on:
Set checked, true or false, on every item of the group. An unchecked item keeps the checkmark's space, so the labels line up.
Sections
<ui-menu-section>groups items, under an optionaltitle.<ui-menu-separator />parts two sections: a thin line, or a thick band before iOS 26.
Submenus
<ui-menu-submenu>is a row with a chevron that opens a nested menu. It takes what a menu does: items, sections, separators and further submenus.- It grows out of its row, over the menu it's in, with the row's label as its header, and the menu behind it fades, as iOS's submenus do. On Android's Material menus it unfolds in the menu's place, with a back arrow in the header.
- A tap on the header, a tap outside the submenu, or Android's back button goes back to the menu it opened from. Choosing one of its items closes every menu.
API
UiMenu
UiMenuTrigger
Selector: [uiMenuTrigger]. Put it on the element inside <ui-menu> that opens it. Without one, the menu grows out of <ui-menu>'s own element.
UiMenuItem
Items, sections, separators and submenus work in a <ui-menu> and in a <ui-context-menu>.
UiMenuSubmenu
UiMenuSection
UiMenuSeparator
No inputs.
Theme colors
The menu reads glass-foreground and glass-muted-foreground (text and icons) and glass-dim (a context menu's dimming layer). See Glass.
Accessibility
- Each item is a button named by its label. A destructive item reads as "Delete, destructive".
accessibilityLabelreplaces both. - A checked item is selected, which VoiceOver reads on iOS.
- Section titles are headings.
- A submenu's row and its header are buttons named by its label. When the submenu opens, a screen reader moves into it.
- When the menu opens, a screen reader moves into it and stays inside until it closes, reading the items in order.
- Reduce Motion: the menu doesn't grow or shrink. It appears in place, and its items fade in.
- Reduce Transparency and Increase Contrast apply as on all glass.
Related
- Context Menu: the same menu, opened by a long press on an element
- Glass: the material the menu is drawn with
- Action Sheet: a list of actions from the bottom of the screen
- Dialogs and overlays: how overlays work and which one to use
