Skip to content

feat(action): add Menu, a dropdown and long-press context menu of actions, plus migration guides - #88

Merged
elik56a merged 1 commit into
masterfrom
feat/menu
Oct 29, 2026
Merged

elik56a merged 1 commit into
masterfrom
feat/menu

Conversation

@eliyahu-kriel

Copy link
Copy Markdown
Collaborator

What

Menu: a list of actions that drops from its trigger, or opens on a long press as a context menu.

  • Same actions as ActionSheet: icon, description, selected (✓), destructive, disabled. onPress runs after the menu closes.
  • Trigger: any node (wrapped in a pressable, named with accessibilityLabel), or ({ open, visible }) => <YourButton />.
  • Opens under the trigger, or above when there's more room. align="auto" lines up with the trigger's near edge, so a ⋯ at the end of a row opens inwards. Sizes itself to its content, so short menus don't scroll.
  • presentation="sheet" opens the actions as an ActionSheet. openOnLongPress for context menus.
  • Designs: iOS 250 px, icons after the label, hairlines between actions; Material and web 200 px, icons first.
  • Pure JS, so it runs in Expo Go and on the web (unlike @react-native-menu/menu and zeego).

Dropdown (shared, not exported)

  • Positions itself inside the area its modal covers instead of the whole window. In apps that's the window, so nothing changes; in the site's phone previews, dropdowns now open inside the phone instead of off-screen.
  • New onClosed and style props, used by Menu.

Docs

  • Menu page with a playground and live examples: icons, a "Sort" button with title, ✓ and descriptions, a long-press context menu.
  • Migration guides: @react-native-menu/menu, zeego, react-native-popup-menu.
  • Reference, guides, AI cheat sheet, README, home page, SEO and npm keywords updated.
  • Showcase: "Photo albums" sorts from a Menu.

Checks

pnpm lint, typecheck, build, 726 tests and the docs build pass locally. The scrollbar and centring fixes and the phone-preview position fix have not been checked in a browser yet.

🤖 Generated with Claude Code

…ions, plus migration guides

Menu drops a list of actions from its trigger, or opens on a long press as a
context menu. It takes the same actions as ActionSheet (icon, description,
selected, destructive, disabled) and runs the pressed one after it closes.
The trigger is any node, or a function that gets open() for your own button.
It opens under the trigger, or above when there's more room, lined up with
the trigger's near edge, and sizes itself to its content. presentation="sheet"
opens the actions as an ActionSheet. The iOS design puts icons after the label
with hairlines between actions; Material and web menus put icons first.

Dropdown now positions itself inside the area its modal covers rather than the
whole window. In apps that's the window, so nothing changes; in the site's
phone previews, dropdowns now open inside the phone instead of off-screen.

Migration guides cover @react-native-menu/menu, zeego and
react-native-popup-menu. The "Photo albums" showcase sorts from a Menu.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@elik56a
elik56a merged commit c577980 into master Oct 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants