React Native Popup Menu – Over Flow Menu

React Native Popup Menu – Over Flow Menu is the most common thing that we can see in the Android applications. In the initial stage popup menu can be seen in the header only, but after the introduction of the material design popup menu can be seen in many places.

You can use the popup menu if you want to provide the number of options to select but don’t want to highlight them. Most developers use them when they provide 2-3 options to select and they don’t want to use navigation drawer (Side Menu).

Popup Menu

In this example, You will see how to generate the popup menu from the header or from anywhere. So let’s get started.

To Make a React Native App

Getting started with React Native will help you to know more about the way you can make a React Native project. We are going to use react-native init to make our React Native App. Assuming that you have node installed, you can use npm to install the react-native-cli command line utility. Open the terminal and go to the workspace and run
npm install -g react-native-cli
Run the following commands to create a new React Native project
react-native init ProjectName
This will make a project structure with an index file named App.js in your project directory.

Installation of Dependencies

To install teh dependencies open the terminal and jump into your project

1. To use Menu, { MenuItem, MenuDivider } you need to install react-native-material-menu using

2. We will need React Navigator to switch from one screen to another so we will also install react-navigation and react-native-gesture-handler dependencies.

These commands will copy all the dependencies into your node_module directory, You can find the directory in node_module.
–save is optional, it is just to update the dependencies in you package.json file.

Linking of Dependencies

After installing the dependencies you need to link it with your project using

After linking the dependency if you face  Could not Compile Settings File project/android/settings.gradle error while building and installing the project then you can find the solution here.

Dependency Version for this Example used is

Project Structure

To start with this Example you need to create a directory like below screenshot:

  1. A pages directory which has another directory called component.
  2. Add two files in the Pages directory called FirstPage.js and SecondPage.js.
  3. Add two files in a component called CustomMenu.js and CustomMenuIcon.js.

App.js will have our Stack Navigator which is like an index file of our application. FirstPage.js and SecondPage.js will be the first and second screen of the application. We will use CustomMenu.js and CustomMenuIcon.js as custom popup menu components.

Now Open App.js in any code editor and replace the code with the following code.


Open FirstPage.js in any code editor and replace the code with the following code.


Open SecondPage.js in any code editor and replace the code with the following code.


Open CustomMenu.js in any code editor and replace the code with the following code.


Open CustomMenuIcon.js in any code editor and replace the code with the following code.


To Run the React Native App

Open the terminal again and jump into your project using.
cd ProjectName
To run the project on an Android Virtual Device or on real debugging device
react-native run-android
or on the iOS Simulator by running
react-native run-ios (macOS only).


That was the React Native Popup Menu. If you have any doubt or you want to share something about the topic you can comment below or contact us here. There will be more posts coming soon. Stay tuned!

Hope you liked it. 🙂

How useful was this post?

Click on a star to rate us!

Average rating / 5. Vote count:

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

0 replies

Leave a Reply

Want to join the discussion?   Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.