Skip to main content

App nav

Info

App Bridge isn't versioned with Polaris. App Bridge APIs and web components are identical in every App Home reference version.

The app nav component configures navigation items for your app in the Shopify admin. On desktop, navigation appears in the left sidebar. On Shopify mobile, it appears in a dropdown from the title bar.

Add links to define navigation items. The app name in the sidebar already links to your app's home route, which defaults to /, so there's no need to add a separate home link. If your home page is at a different path (for example, /app), add an s-link with rel="home" to override the default and hide it from the rendered menu. To trigger navigation from JavaScript, use the Navigation API.

If you're building an App Home UI extension, then refer to the extension's App nav reference instead. App Home UI extensions don't support rel="home" on s-link.

  • App navigation: Create a persistent navigation menu with links to different sections of your app.
  • Desktop sidebar: Display navigation in the left sidebar on desktop for easy access to app sections.
  • Mobile dropdown: Provide navigation through a dropdown from the title bar on Shopify mobile.

Properties for the app nav element. This element configures the app nav in the Shopify admin.

Anchor to children
children
any

The navigation items to display, provided as link child elements. Each link creates a navigation item in the app's navigation menu. Include one link with rel="home" to set the default landing page. Commonly used to organize your app into logical sections (like "Products", "Orders", or "Settings").


Properties for links used as children.

string
required

The URL for the navigation item. Use a relative path within your app, such as /products or /settings. An app: URL or a URL on your app's origin also works. App Bridge drops an item whose href points outside your app, such as a shopify: URL or a Shopify admin URL, so the item doesn't appear in the menu. When clicked, the link navigates the app to this route. If your app's client-side router handles the click, then the navigation happens without a full page reload. Otherwise, the Shopify admin reloads your app at the route. The path should match a route defined in your app's routing configuration.

Anchor to children
children
string

The visible label text for the navigation item. Keep labels short (1-2 words) and use nouns that describe the destination (such as "Products", "Settings", or "Reports"). Avoid verbs like "Manage" or "View" to maintain consistency with Shopify admin navigation patterns.

'home'

Set to "home" to designate this link as the app's default landing page. When set, the link is hidden from the navigation menu. Only one link should have rel="home".

The navigation menu shows only links to pages in your app. An item's href can be a relative path in your app, such as /settings, an app: URL, or a URL on your app's origin. App Bridge drops an item whose href points outside your app, such as a shopify: URL, a Shopify admin URL, or another external URL. The item doesn't appear in the menu, and App Bridge logs a warning in the browser console. To link to a page in the Shopify admin, put the link in a page of your app.


Add consistent navigation to your app. This example shows an app whose home page is mounted at /app, so an s-link with rel="home" designates /app as the home route and hides that link from the rendered menu.

Navigation menu

A Shopify admin sidebar showing a navigation menu with Templates and Settings links under the app name.

html

<s-app-nav>
<s-link href="/app" rel="home">Home</s-link>
<s-link href="/app/templates">Templates</s-link>
<s-link href="/app/settings">Settings</s-link>
</s-app-nav>

  • Keep navigation concise: Too many items makes navigation harder to scan. Group related pages or use subpages if you have many sections.
  • Use clear, concise labels: Navigation labels should be 1-2 words using nouns, such as "Settings", "Templates", or "Reports".
  • Order by importance: Place the most frequently used sections first in the navigation.
  • Match labels to page titles: Keep navigation labels consistent with the destination page titles.

You can't nest navigation items inside other navigation items. Structure your app with a single level of navigation.


Was this page helpful?