Skip to main content
Set default styling options and the light or dark style for the device status bar while your app is open. In Light mode, the status bar displays black text. In Dark mode, it displays white text. In Auto mode, it follows the device’s light or dark mode setting. You can also set the status bar visibility and style at runtime from your website using the Median JavaScript Bridge.

Configuration options

Median supports four parameters for controlling status bar appearance:
Overlay setting on AndroidWith the Overlay setting enabled on Android, the keyboard overlays your web content, which can cause issues for users completing forms. If you use forms in your app, consider one of these solutions:
  1. Disable the Overlay setting via the JavaScript Bridge when showing a page that includes forms.
  2. Make use of the keyboard listener functions to disable/enable the Overlay setting via the JavaScript Bridge when the keyboard is active/inactive.

Use your AI agent

Use the Median MCP with your AI agent to change the status bar style and background colors. See Median MCP server to set it up.

Setting the status bar at runtime

Use the JavaScript Bridge to update the status bar dynamically, either in response to user actions or automatically on page load.

Option 1: Auto-match the status bar to your page background

To have Median automatically detect your webpage’s background color and apply it to the status bar, call the built-in helper function when the library loads. If you use the median-js-bridge npm package, call Median.statusbar.matchBodyBackgroundColor({ active: true }) instead.

Option 2: Set custom status bar styles

For full control, call median.statusbar.set() with your desired parameters. This is useful for apps that need different status bar treatments for different content types (for example, a red status bar over a video player). The example code below creates a red status bar with 50% alpha and white icons, and has the web content extend underneath the status bar.
Last modified on December 3, 2026