Skip to main content
Version: Next 🚧

Migrate from zeego

zeego composes a menu from parts (Root, Trigger, Content, Item, ItemTitle…) and shows native menus, so it needs a development build. Menu takes one actions array and is pure JavaScript, so it runs in Expo Go too.

- import * as DropdownMenu from 'zeego/dropdown-menu';
+ import { Menu } from '@elik56a/react-native-pickers';

- <DropdownMenu.Root>
- <DropdownMenu.Trigger>
- <MoreIcon />
- </DropdownMenu.Trigger>
- <DropdownMenu.Content>
- <DropdownMenu.Item key="edit" onSelect={edit}>
- <DropdownMenu.ItemTitle>Edit</DropdownMenu.ItemTitle>
- </DropdownMenu.Item>
- <DropdownMenu.Item key="delete" destructive onSelect={remove}>
- <DropdownMenu.ItemTitle>Delete</DropdownMenu.ItemTitle>
- </DropdownMenu.Item>
- </DropdownMenu.Content>
- </DropdownMenu.Root>
+ <Menu
+ accessibilityLabel="More options"
+ actions={[
+ { label: 'Edit', onPress: edit },
+ { label: 'Delete', destructive: true, onPress: remove },
+ ]}
+ >
+ <MoreIcon />
+ </Menu>
zeegoReact Native Pickers
DropdownMenu.Root + TriggerMenu, with the trigger as children
ContextMenu.RootMenu openOnLongPress
Item + onSelectan action with onPress
ItemTitle / ItemSubtitlelabel / description
ItemIcon / ItemImageicon: any node
destructive / disabled on Itemdestructive / disabled
CheckboxItem value="on" + ItemIndicatorselected: true (a ✓); toggle it in onPress
Labeltitle
Group / Separator / Sub—
Root onOpenChangeonOpen / onClose
Content alignalign
ContextMenu.Preview—

See all migration guides for other libraries.