Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to create side menu with react-native?

I'm new in React Native, I want to create a side menu like this, any reference for this?

side menu

like image 773
Rofiatul Adawiyah Avatar asked May 09 '17 04:05

Rofiatul Adawiyah


People also ask

How do I create a drawer menu in react native?

Create two separate classes "DashboardScreen" and "WelcomeScreen" in the react native app to display on screen. Add these screens to createStackNavigator and add "md-menu" icon of 'react-native-vector-icons/Ionicons' package. On pressing the menu icon, call navigation. openDrawer() method to open drawer.


2 Answers

I would like to say use reactnavigation. that is providing drawer To open and close drawer, navigate to 'DrawerOpen' and 'DrawerClose' respectively.

 this.props.navigation.navigate('DrawerOpen'); // open drawer     this.props.navigation.navigate('DrawerClose'); // close drawer 

https://reactnavigation.org/docs/drawer-based-navigation.html

or here is one example That also is good . refer this

https://github.com/dailydrip/react-native-navigation-sample

like image 169
Sport Avatar answered Sep 19 '22 02:09

Sport


This is one of my simple project that may show you the idea how to implement a side menu by yourself.

https://github.com/reactazteam/PushyHorizontalMenu

enter image description here

like image 34
Hoang Trung Avatar answered Sep 21 '22 02:09

Hoang Trung