For the complete documentation index, see llms.txt. This page is also available as Markdown.

NavigationBar.setOptions

Function description

Change the Navigation Bar's back button, home button, and title display, transparency, background color, and icon/text theme. Only the fields you pass are applied, and omitted fields keep the value applied previously. Before the first call, the value is in the mini app config's navigationBaris.

transparentBackgroundis truethen the Navigation Bar overlaps the content and does not take up layout height. In this case backgroundColoris not applied. backgroundColorto nullif you pass it, it returns to the theme's default background color. themeonly changes the icon/text color.

Type

Params

type NavigationBarTheme = "light" | "dark";

interface SetNavigationBarOptions {
  withBackButton?: boolean;
  withHomeButton?: boolean;
  withTitle?: boolean;
  transparentBackground?: boolean;
  backgroundColor?: string | null; // `#RRGGBB` or `#RRGGBBAA`
  theme?: NavigationBarTheme;
}

Response

Promise<void>;

Example code

Was this helpful?