Search docs/

Status Bar

v2.4.2

Contents

The Status Bar plugin provides the ability to customize the appearance of the native mobile status bar, including setting visibility, background color, and more.

Index

Classes


Classes

StatusBar

usage:

import { StatusBar } from '@ionic-enterprise/statusbar/ngx';

constructor(private statusBar: StatusBar) { }

...

// let status bar overlay webview
this.statusBar.overlaysWebView(true);

// set status bar to white
this.statusBar.backgroundColorByHexString('#ffffff');

isVisible

● isVisible: boolean

Whether the StatusBar is currently visible or not.


backgroundColorByHexString

backgroundColorByHexString(hexString: string): void

Set the status bar to a specific hex color (CSS shorthand supported!).

iOS note: you must call StatusBar.overlaysWebView(false) to enable color changing.

Parameters:

Name Type Description
hexString string The hex value of the color.

Returns: void


backgroundColorByName

backgroundColorByName(colorName: string): void

Set the status bar to a specific named color. Valid options: black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown.

iOS note: you must call StatusBar.overlaysWebView(false) to enable color changing.

Parameters:

Name Type Description
colorName string The name of the color (from above)

Returns: void


hide

hide(): void

Hide the StatusBar

Returns: void


overlaysWebView

overlaysWebView(doesOverlay: boolean): void

Set whether the status bar overlays the main app view. The default is true.

Parameters:

Name Type Description
doesOverlay boolean Whether the status bar overlays the main app view.

Returns: void


show

show(): void

Show the StatusBar

Returns: void


styleBlackOpaque

styleBlackOpaque(): void

Use the blackOpaque statusbar (light text, for dark backgrounds).

Returns: void


styleBlackTranslucent

styleBlackTranslucent(): void

Use the blackTranslucent statusbar (light text, for dark backgrounds).

Returns: void


styleDefault

styleDefault(): void

Use the default statusbar (dark text, for light backgrounds).

Returns: void


styleLightContent

styleLightContent(): void

Use the lightContent statusbar (light text, for dark backgrounds).

Returns: void



Other Versions