Navigation Bars for Power Apps
A navigation bar is the strip across the top of a screen that carries the app name and, on most variants, a logo and the signed-in user's photo. The tablist and the mega menus also move users around the app: a row of tabs, or dropdown menus that open a panel of items. Reach for one when every screen needs the same header, and pair it with a sidebar when you also want a menu down the left edge. Every variant here is paid, so copying one needs a paid plan.
Pick a variant
- Navigation BarPaidClassic, Modern
A 50px header with logo, title and the signed-in user's photo
Settings: Title, Show User Profile, Use Custom SVG Code, SVG Logo Code
- NavBar with TablistPaidClassic
A header with a centred row of tabs and an underline under the active one
Settings: Title, Show User Profile, Use Custom SVG Code, SVG Logo Code, Tab Items (Add Tab, Remove, Reset)
- Mega Menu NavbarPaidClassic
Menus that open a panel of cards with an emoji, a label and a description
Settings: Logo Text, CTA Button Text, Show User Profile, Dropdown Menus (Add Menu, Menu Name, Add Item, emoji picker, Item Label, Short description)
- Minimal Mega Menu NavbarPaidClassic
Text-only menus with underline indicators and an outlined button
Settings: Logo Text, CTA Button Text, Dropdown Menus (Add Menu, Menu Name, Add Item, Item Label, Short description)
- NavBar with Scrollable ContentPaidClassic, Modern
A fixed header above a content area that scrolls on its own
Settings: Project Name, Show Logo, Show User Profile Picture, Content Height (px)
| Component | Plan | YAML | What it is for | Settings you can change |
|---|---|---|---|---|
| Navigation Bar | Paid | Classic, Modern | A 50px header with logo, title and the signed-in user's photo | Title, Show User Profile, Use Custom SVG Code, SVG Logo Code |
| NavBar with Tablist | Paid | Classic | A header with a centred row of tabs and an underline under the active one | Title, Show User Profile, Use Custom SVG Code, SVG Logo Code, Tab Items (Add Tab, Remove, Reset) |
| Mega Menu Navbar | Paid | Classic | Menus that open a panel of cards with an emoji, a label and a description | Logo Text, CTA Button Text, Show User Profile, Dropdown Menus (Add Menu, Menu Name, Add Item, emoji picker, Item Label, Short description) |
| Minimal Mega Menu Navbar | Paid | Classic | Text-only menus with underline indicators and an outlined button | Logo Text, CTA Button Text, Dropdown Menus (Add Menu, Menu Name, Add Item, Item Label, Short description) |
| NavBar with Scrollable Content | Paid | Classic, Modern | A fixed header above a content area that scrolls on its own | Project Name, Show Logo, Show User Profile Picture, Content Height (px) |
Paid means any paid plan (which plan do I need?). Classic and Modern are the two Power Apps control sets you can pick from the Copy YAML button. Open the category in the library: Navigation Bars.
Copy one from the Power Apps navigation bar library; the steps to paste it into Power Apps Studio are on Getting Started.
After you paste
Control names below use the default prefixes; if you changed them, read your own YAML.
NavBar with Tablist. The tab buttons sit in a gallery called galTabs, and each click runs UpdateContext({selectedTab: ThisItem.id}). selectedTab is a context variable, so it belongs to one screen and holds the tab's number, not its label. To send each tab to a screen, put this in the OnSelect of btnTab:
UpdateContext({selectedTab: ThisItem.id});
Switch(ThisItem.id,
1, Navigate(TrafficScreen),
2, Navigate(ContentScreen)
)
On every other screen you paste the bar into, the underline falls back to tab 1 because the context variable starts blank there. Set it in that screen's OnVisible:
UpdateContext({selectedTab: 2})
Mega Menu Navbar. Each dropdown panel holds a horizontal gallery of cards with a transparent button on top. For the first default menu the gallery is galProductsItems and the button is btnProductsItemOverlay: the names use the menu's internal id, not the Menu Name you typed. It has no OnSelect yet. Add yours, then clear varActiveNav so the panel closes:
Switch(ThisItem.label,
"All Projects", Navigate(ProjectsScreen),
"Task Board", Navigate(TaskBoardScreen)
);
Set(varActiveNav, "")
Minimal Mega Menu Navbar works the same way with gblActiveNav and buttons such as btnProjectsItemMinOverlay. Navigation Bar and NavBar with Scrollable Content need no wiring: imgLogo holds the logo and imgUserProfilePicture is already bound to User().Image.
Good to know
- The logo is a placeholder until you replace it. With Use Custom SVG Code off,
imgLogogetsImage: =SampleImage. Upload your logo as media in Studio and point the Image property at it. With the switch on, the pasted SVG is embedded in the YAML as a data URL; write its attributes with single quotes, as the default SVG does, because a double quote ends the formula's text early. NavBar with Scrollable Content has no SVG box, only Show Logo, and itsimgLogois pasted without an image. - Content Height (px) is what makes the scrollable variant scroll.
conParentScreenhas LayoutOverflowY set to Scroll and holdsconScrollScreen, whose Height is your Content Height value (1500 by default). Only the part taller than the visible area (the screen height minus the 50px bar) scrolls: 1500 on an 800px tall screen gives 750px of scrolling. Five placeholder labels,lblSection1tolblSection5, sit inside for you to replace. - The two mega menus have an Instructions tab and need the right stacking order. Their panels are separate containers beside the bar, visible while
varActiveNav(gblActiveNavon the Minimal one) holds the menu id; a transparent full-screen button,btnDropdownOverlay(btnDropdownOverlayMinon the Minimal one), closes them on a click outside. In the Tree view, keep the panels and the overlay in front of your page content or they draw underneath it. Menus you add in Settings get an internal id of Section plus a number. - One switch only changes the preview. Show User Profile on NavBar with Tablist does not reach the YAML:
imgUserProfilePictureis always pasted, so delete it in Studio if you do not want it. - Settings editing is a step above copying. Editing the Settings tab needs any paid plan except the old Components subscription; below that the editor is read-only with an Unlock prompt.
- Both control sets and both themes. The Navigation Bar and the scrollable bar generate Classic and Modern control YAML; the two mega menus and the tablist bar are Classic only, because their menu items are buttons with their own hover and active colours, which the Modern Button cannot do. The theme toggle in the card header switches each generator between its light and dark colours. Dark is complete on the Classic Navigation Bar and the two mega menus. Check the others after pasting: the scrollable bar and the Modern Navigation Bar only darken the bar, so
lblTitlekeeps its default text colour, and the tablist bar keeps a whiteconTabbehind its tabs.
Related
Open the category in the library: Navigation Bars. Related guides: Sidebars and Tabs.