Preset Routes

View Markdown

Last edited on 2026-08-26

To reduce development costs, the Base Library provides a set of common preset route animations.

routeType Minimum Base Library Version
wx://bottom-sheet 3.1.0
wx://upwards 3.1.0
wx://zoom 3.1.0
wx://cupertino-modal 3.1.0
wx://cupertino-modal-inside 3.1.0
wx://modal-navigation 3.1.0
wx://modal 3.1.0

Usage

Simply specify the corresponding routeType when performing a route transition.

Note: All the routing effects described above can be achieved by using custom routing. Refer to the source files in the sample code to customize the desired effects.

wx.navigateTo({
  url: 'xxx',
  routeType: 'wx://modal'
})

Sample Code

Preview in Developer Tools

Demo

wx://bottom-sheet
Half-screen Dialog
wx://upwards
Enter Upwards
wx://zoom
Zoom In Entry
wx://cupertino-modal-inside
Navigate from wx-cupertino-modal to wx-cupertino-modal-inside
wx://modal-navigation
Navigate from wx-cupertino-modal to wx-modal-navigation
wx://modal
Navigate from wx-modal to wx-modal-navigation