Parameters
This API does not require any parameters.Default Behavior
- The home button displays by default if the user’s entry point is not the homepage
- The return-home option won’t appear if the tab bar redirects to
pages/index/indexin app.json
Code Example
Basic Usage with Feature Detection
Delayed Execution
Conditional Hiding
Use Cases
Onboarding Flows
Onboarding Flows
Hide the home button during multi-step onboarding to prevent users from accidentally leaving the flow.
Payment Flows
Payment Flows
Hide during critical payment steps to ensure users complete the transaction.
Kiosk Mode
Kiosk Mode
Hide when the Mini Program is used in a kiosk or single-purpose context.
Related APIs
my.setNavigationBar
Customize navigation bar
my.reLaunch
Relaunch to a page