Skip to main content
Use this API to navigate to a page defined in the tab bar configuration. All non-tab pages in the page stack will be closed.

Parameters

Pages opened with my.navigateTo or my.redirectTo do not show the bottom tab bar, even if they are defined in the tabBar configuration. The first page of the tabBar must be the home page.

tabBar Configuration

Tab pages are defined in the tabBar field of app.json: Each item in items: The recommended icon size is 60×60 px; other sizes are stretched non-uniformly.

Code Example

Basic Usage

With Callbacks

Configuration

The target page must be defined in app.json:

Important Notes

  • The URL cannot include query parameters
  • The first page in tabBar must be the homepage
  • Pages opened via my.navigateTo or my.redirectTo won’t display the tab bar even if defined in tabBar configuration
  • Tab icons should be 60×60px for optimal display

Differences from Other Navigation APIs

my.navigateTo

Navigate to a new page

my.setTabBarStyle

Customize tab bar style