Menu
Anchored actions, submenus and context menus.
- Native host
- Liquid Glass on iOS 26
- In the first release
import { Menu, menuPrimitive } from "nitro-ui-sdk/menu";- HeroUI Native
- MenuSubMenu
- Expo UI
- MenuContextMenuDropdownMenu

Light 
Dark 
Liquid Glass
On this page
Menu organizes contextual commands into named sections and nested submenus. Use ActionSheet for a flat contextual decision with a prominent cancel action.
Anatomy
import { Menu } from "nitro-ui-sdk/menu";
<Menu.Root label="More" name="Draft actions" cancelLabel="Cancel" groups={[]}>
<Menu.Content>
<Menu.Trigger />
</Menu.Content>
</Menu.Root>;
| Part | Description |
|---|---|
| Root | Owns menu configuration and dispatch. |
| Trigger | Native tap trigger. |
| ContextTrigger | Native long-press trigger for the long-press variant. |
| Content / Group | Layout wrappers for custom trigger composition. |
| Label / Item | Optional text for custom composition. |
| Separator | Visual divider for custom composition. |
Usage
import { Menu } from "nitro-ui-sdk/menu";
<Menu.Root label="More" name="Draft actions" cancelLabel="Cancel" groups={[
{ label: "Organize", items: [
{ id: "sort", label: "Sort by", icon: "arrow.up.arrow.down", items: [
{ id: "date", label: "Last edited", selected: true, onPress: () => {} },
{ id: "name", label: "Name", onPress: () => {} },
] },
] },
]} />;
Variants and sizes
tap opens immediately. long-press renders a context trigger and an accessible tap alternative by default. The native menu uses system sizing.
States
Each item supports disabled, destructive and selected. A disabled submenu disables its descendants. Supply globally unique action IDs across sections and nesting.
Controlled
The app owns selected checkmarks through each item’s selected flag. Update the flag in onPress to reflect the new selection. Native presentation state follows the current menu session.
Liquid Glass
UIKit supplies the native menu chrome on iOS 26. The kit’s material preference controls the trigger. Android uses its opaque system menu.
Props
Root
| Prop | Type | Default | Description |
|---|---|---|---|
| label | string | required | Tap trigger name. |
| name | string | required | Native menu title and agent name. |
| cancelLabel | string | required | Cancel label for the UIKit controller action list. |
| groups | readonly MenuGroup[] | required | Sections with optional labels and entries. |
| variant | MenuVariant | tap | Tap or long-press trigger. |
| contextLabel | string | required for long-press | Long-press trigger name. |
| disabled | boolean | false | Disables triggers and actions. |
| styles | PartStyles | — | Part style resolvers. |
| api | Controller |
— | Controller binding. |
| agentId | string | — | Stable agent identity. |
| children | ReactNode | default anatomy | Custom trigger layout. |
MenuItem and MenuSubmenu entries
| Prop | Type | Default | Description |
|---|---|---|---|
| id | string | required | Stable entry ID, globally unique for choices. |
| label | string | required | Visible and spoken entry name. |
| icon | string | — | iOS SF Symbol name. |
| disabled | boolean | false | Disabled entry. |
| items | readonly MenuEntry[] | submenu only | Nested choices or submenus. |
| selected / destructive | boolean | false | Choice checkmark or destructive emphasis. |
| onPress | (details) => void | required for choices | Dispatch callback. |
| confirm | Confirmation | — | Localized approval for an agent choice. |
Trigger, ContextTrigger, Label, Item
| Prop | Type | Default | Description |
|---|---|---|---|
| part | MenuPart | component part | Style part to resolve. |
| children | string | Root label for triggers | Override or provide visible text. |
Content, Group, Separator
| Prop | Type | Default | Description |
|---|---|---|---|
| part | MenuPart | component part | Style part to resolve. |
| children | ReactNode | required for Content and Group | Trigger composition. |
Controller API
import { useState } from "react";
import { Menu, menuPrimitive } from "nitro-ui-sdk/menu";
export function DraftMenu() {
const [api] = useState(menuPrimitive.createApi);
return <Menu.Root api={api} label="More" name="Draft actions" cancelLabel="Cancel" groups={[]} />;
}
| Action | Signature | Result |
|---|---|---|
| open | (source?) => ActionStatus | Opens the native action list. |
| close | (source?) => ActionStatus | Dismisses the current menu. |
| press | (id, source?) => ActionStatus | Runs a leaf action from anywhere in the hierarchy and closes on acceptance. |
Styles
import { Menu } from "nitro-ui-sdk/menu";
<Menu.Root label="More" name="Draft actions" cancelLabel="Cancel" groups={[]}
styles={{ trigger: ({ tokens }) => ({ style: { cornerRadius: tokens.radius.full } }) }} />;
Resolvers receive tokens, the variant, system size and the open and disabled state fields. UIKit controls internal menu layout.
Accessibility
Native buttons have named touch and accessibility actions. UIKit announces menu titles, section titles, option names, disabled state and selected checkmarks. A long-press menu can keep the tap alternative for discovery.
Agent API
| Action | Arguments | Notes |
|---|---|---|
| open | None | Opens from the trigger. |
| press | Leaf action ID string | The menu exposes enabled leaf options. Individual approvals are taken from confirm. |
| close | None | Dismisses the foreground menu. |
Platform notes
| iOS | Android | |
|---|---|---|
| Implementation | UIMenu, UIAction and native context interaction. Controller opening uses a flat UIKit action list. |
PopupMenu with submenus, section labels and checkmarks. |
| Verification | iOS harness. | Implementation written. Build and runtime verification require an Android NDK. |