--- title: Navigation description: The API provided to extensions to navigate to extensions or host page. api_version: 2026-01 api_name: customer-account-ui-extensions source_url: html: https://shopify.dev/docs/api/customer-account-ui-extensions/latest/apis/navigation md: https://shopify.dev/docs/api/customer-account-ui-extensions/latest/apis/navigation.md --- # Navigation The API provided to extensions to navigate to extensions or host page. ## Navigation Navigation API for all extensions. [Refer to supported protocols](https://shopify.dev/docs/api/customer-account-ui-extensions/unstable#custom-protocols) * **addEventListener** **(type: "currententrychange", cb: (event: NavigationCurrentEntryChangeEvent) => void) => void** **required** * **currentEntry** **NavigationHistoryEntry** **required** The currentEntry read-only property of the Navigation interface returns a NavigationHistoryEntry object representing the location the user is currently navigated to right now. * **navigate** **NavigateFunction** **required** The navigate() method navigates to a specific URL, updating any provided state in the history entries list. * **removeEventListener** **(type: "currententrychange", cb: (event: NavigationCurrentEntryChangeEvent) => void) => void** **required** * **updateCurrentEntry** **(options: NavigationUpdateCurrentEntryOptions) => void** **required** The updateCurrentEntry() method of the Navigation interface updates the state of the currentEntry; used in cases where the state change will be independent of a navigation or reload. ### NavigationCurrentEntryChangeEvent The NavigationCurrentEntryChangeEvent interface of the Navigation API is the event object for the currententrychange event, which fires when the Navigation.currentEntry has changed. * from Returns the NavigationHistoryEntry that was navigated from. ```ts NavigationHistoryEntry ``` * navigationType Returns the type of the navigation that resulted in the change. ```ts NavigationTypeString ``` ### NavigationHistoryEntry The NavigationHistoryEntry interface of the Navigation API represents a single navigation history entry. * getState Returns a clone of the available state associated with this history entry. ```ts () => unknown ``` * key Returns the key of the history entry. This is a unique, UA-generated value that represents the history entry's slot in the entries list rather than the entry itself. ```ts string ``` * url Returns the URL of this history entry. ```ts string | null ``` ### NavigationTypeString An enumerated value representing the type of navigation. ```ts 'push' | 'replace' | 'traverse' ``` ### NavigateFunction ### NavigationUpdateCurrentEntryOptions * state ```ts unknown ``` Examples ### Examples * #### Extension.jsx ##### Default ```jsx import '@shopify/ui-extensions/preact'; import {render} from 'preact'; export default async () => { render(, document.body); }; function Extension() { return ( { navigation.navigate('extension://orders'); }} > Navigate to orders path ); } ```