Navigation API isn't working on POS UI Extension 2025-10 version

The latest version of POS-UI-Extension introduced navigating to the POS native screens. I tried following the doc. But getting an error.

Here’s my code:

import { render } from 'preact';

export default function extension() {
  render(<SmartGridTile />, document.body);
}

function SmartGridTile() {

  const onTileClick = () => {
    try {
      console.log('tile clicked');
      navigation.navigate('shopify:point-of-sale/draft_orders/XYZ');
    } catch (error) {
      console.error('Error navigating to draft order:', error);
      shopify.toast.show('Unable to view draft order.');
    }
  };

  return (
    <s-tile
      heading="Redirect Example App"
      subheading="Redirect to draft order"
      onClick={onTileClick}
    />
  );
}

Here’s the error I’m getting:

{
“name”: “ReferenceError”,
“message”: “navigation is not defined”
}

I understand that there might be some export of navigation. But couldn’t find any export called navigation. Also tried using shopify.navigation, which doesn’t work either. Every other API is referenced from shopify.xyz, but the navigation api is totally different in the Doc. & that doesn’t work anymore after upgrading to the 2025-10 API version.

Please guide me if I’m doing anything wrong. TIA.

Hi @Development_Bevy, navigation is not supported from pos.home.tile.render target at this time. Could you pls try from a pos.home.modal.render or *.action.render target?

Thanks. It worked from the modal. Initially, when I tried it from the modal, I was getting TypeScript errors.