This documentation is available as Markdown for AI agents and LLMs. See the full Markdown index or append .md to any documentation URL.
ContextMenu
A SwiftUI ContextMenu component for displaying context menus.
iOS
tvOS
Included in Expo Go
Recommended version:
~56.0.26
Expo UI ContextMenu matches the official SwiftUI contextMenu API and displays a menu when long-pressed. For single-tap menu interactions, use Menu instead.


Installation
Terminal
If you are installing this in an existing React Native app, make sure to install expo in your project.
Usage
Basic context menu
BasicContextMenuExample.tsx
Context menu with system images
ContextMenuWithImagesExample.tsx
Context menu with preview
Use ContextMenu.Preview to show a custom preview above the menu when opened.
ContextMenuWithPreviewExample.tsx
Context menu with picker
ContextMenuWithPickerExample.tsx
Context menu with sections
Use Section and Divider components to organize menu items.
ContextMenuWithSectionsExample.tsx
Nested context menus
Use nested ContextMenu components to create submenus.
NestedContextMenuExample.tsx
API
import { ContextMenu } from '@expo/ui/swift-ui';
No API data file found, sorry!