App nav
The app nav component configures navigation items that appear in your app's sidebar within the Shopify admin. Supply child s-link entries to define your app's sub-navigation. The app name in the sidebar already acts as the home link, so there's no need to add a root (/) entry.
Unlike the App Bridge App nav, rel="home" on s-link isn't supported. To trigger navigation from JavaScript, use the Navigation API.
Anchor to PropertiesProperties
Configure the following properties on the app nav component.
- ComponentChildrenComponentChildren
The navigation items to inject into the Shopify admin sidebar. Provide
<s-link>children where each link represents a navigation item. This component does not render any visible UI itself.- stringstring
A unique identifier for the element.
ComponentChildren
Represents any valid children that can be rendered within a component, including elements, strings, numbers, or arrays of these types. This is an alias for Preact's `ComponentChildren` type.
preact.ComponentChildrenAnchor to ExamplesExamples
Register sub-navigation links for your app in the Shopify admin sidebar. This example uses an s-app-nav root with s-link children. The app name already acts as the home link, so there's no need to add a root (/) entry.
Add navigation to the admin shell
