All things Shopify and commerce
I am using the NavMenu component from Shopify App Bridge React to create in-app navigation. I want to create a submenu, such as under a "Settings" menu, with options like "Profile Settings" and "General Settings." Is this possible?
https://shopify.dev/docs/api/app-bridge-library/react-components/navmenu-component.
I am from Mageplaza - Shopify solution expert.
Yes, you can create submenus in the Shopify App Bridge React NavMenu component by nesting NavMenu.Item components within parent menu items. Here's how to implement a "Settings" submenu:
import { NavMenu } from "@shopify/app-bridge-react";
function AppNavigation() {
return (
<NavMenu>
{/* Main navigation items */}
<NavMenu.Item title="Home" url="/" />
<NavMenu.Item title="Orders" url="/orders" />
{/* Settings submenu */}
<NavMenu.Item title="Settings">
<NavMenu.Item
title="Profile Settings"
url="/settings/profile"
/>
<NavMenu.Item
title="General Settings"
url="/settings/general"
/>
</NavMenu.Item>
</NavMenu>
);
}
Key points:
This creates a hierarchical menu structure where:
Remember to:
The nested menu structure will automatically handle accessibility attributes and keyboard navigation according to Shopify's standards.
Please let me know if it works as expected!
Best regards!
Mageplaza | Top-Rated Shopify Agency | Trusted by 230,000+ worldwide merchants
If our suggestion works for you, please give it a Like or mark it as a Solution!
Should you have any questions or concerns, feel free to contact us via consultant@mageplaza.com
Discover how to increase customer engagement on your store with articles from Shopify A...
By Jacqui Apr 23, 2025Hey Community 👋 Did you know that March 15th is National Everything You Think Is W...
By JasonH Apr 1, 2025Discover how to increase the efficiency of commerce operations with Shopify Academy's l...
By Jacqui Mar 26, 2025