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:
| Protocol | Use case | Example |
|---|---|---|
shopify:admin | Deep link into the Shopify Admin | shopify:admin/products/1234567890 |
app: | Navigate within your app | app:settings/advanced |
| Relative path | Route within your app | /reviews/${product.id} |
External navigations (Admin back button, deep links) are reflected in window.location automatically.
Anchor to Use casesUse cases
- 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:adminprotocol. - URL-driven state: Update the browser URL with
history.pushState()ornavigation.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?