Skip to main content

Navigation API

App home UI extensions support standard browser navigation APIs. You can use window.location, window.history, and window.navigation directly, so Single Page Application (SPA) routers work without configuration.

Use these protocols when building links or navigating programmatically:

ProtocolUse caseExample
shopify:adminDeep link into the Shopify Adminshopify:admin/products/1234567890
app:Navigate within your appapp:settings/advanced
Relative pathRoute within your app/reviews/${product.id}

External navigations (Admin back button, deep links) are reflected in window.location automatically.

  • Multi-page apps: Use SPA routing (for example, preact-iso) with relative paths to build multi-page app experiences.
  • Admin deep links: Link merchants to specific admin pages like products, orders, or settings using the shopify:admin protocol.
  • URL-driven state: Update the browser URL with history.pushState() or navigation.navigate() to reflect app state without a full page reload.
  • External resources: Open external URLs in a new tab or the current window.

Was this page helpful?