Create A Navigation Menu on Power Apps

Hi. Welcome back to another tech blog. Here, we are going to learn how to create a navigation menu on power apps.

Suppose, we have 3 screens and we wish to build a left navigation bar for it using a hamburger icon.



Create a new component and follow below steps:
1. Rename the component to 'compLeftNavBar'.
2. Insert > Icon > Hamburger
3. Insert > Layout > Blank flexible height gallery (skip connecting it to a data source)

Inside your gallery place following icons:
1. Insert > Shapes > Rectangle
2. Insert > Text Label

This is how your component will look like:

Now, there are certain functionalities you want to implement in this component:
  • The gallery should hide and show when user clicks on the hamburger icon.
  • The items in gallery must point and navigate to the screens in our App.
  • The area taken by the component shouldn't interfere with the elements on the App.
Let's cover them one by one.

[Link] - Hide and Show Left Navigation on Icon Click

[Link] - Point and Navigate to Screens in Component.

[Link] - Restrict Component Interference with the Elements on Screen.


Now, that you have followed all 3 (at least top 2) links above. Let's complete this tutorial.

Place the component on your screen.

If you want, you can change the background of your component too.

Now, click on the component and edit its `MenuItems` property.

Table(
    {
        MenuLabel: "Home",
        MenuIcon: Icon.Home,
        MenuScreenNavigate: 'Home Screen',
        MenuID: 1
    },
    {
        MenuLabel: "Profile",
        MenuIcon: Icon.CheckBadge,
        MenuScreenNavigate: 'Profile Screen',
        MenuID: 2
    },
    {
        MenuLabel: "Cart",
        MenuIcon: Icon.AddDocument,
        MenuScreenNavigate: 'Cart Screen',
        MenuID: 3
    }
)

Now add this component to every other screen on your app. Try Play. If navigation doesn't seem to work, check if  MenuScreenNavigate under `MenuItems` property is correctly defined.

 









Comments

Popular

How To Create MySQL Table with SequelizeJS

How To Read CSV Files in Java as Maven Project

How To Create A Hibernate Project in Maven