@ionic-native/status-bar

  • Version 5.36.0
  • Published
  • 24.3 kB
  • 1 dependency
  • MIT license

Install

npm i @ionic-native/status-bar
yarn add @ionic-native/status-bar
pnpm add @ionic-native/status-bar

Overview

Ionic Native - Native plugins for ionic apps

Index

Variables

variable StatusBar

const StatusBar: StatusBarOriginal;

    Classes

    class StatusBarOriginal

    class StatusBarOriginal extends IonicNativePlugin {}
    • Status Bar statusbar true Manage the appearance of the native status bar.

      Requires Cordova plugin: cordova-plugin-statusbar. For more info, please see the [StatusBar plugin docs](https://github.com/apache/cordova-plugin-statusbar).

      import { StatusBar } from '@ionic-native/status-bar/ngx';
      constructor(private statusBar: StatusBar) { }
      ...
      // let status bar overlay webview
      this.statusBar.overlaysWebView(true);
      // set status bar to white
      this.statusBar.backgroundColorByHexString('#ffffff');

    property isVisible

    isVisible: boolean;
    • Whether the StatusBar is currently visible or not.

    method 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.

      Parameter hexString

      The hex value of the color.

    method 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.

      Parameter colorName

      The name of the color (from above)

    method hide

    hide: () => void;
    • Hide the StatusBar

    method overlaysWebView

    overlaysWebView: (doesOverlay: boolean) => void;
    • Set whether the status bar overlays the main app view. The default is true.

      Parameter doesOverlay

      Whether the status bar overlays the main app view.

    method show

    show: () => void;
    • Show the StatusBar

    method styleBlackOpaque

    styleBlackOpaque: () => void;
    • Use the blackOpaque statusbar (light text, for dark backgrounds).

    method styleBlackTranslucent

    styleBlackTranslucent: () => void;
    • Use the blackTranslucent statusbar (light text, for dark backgrounds).

    method styleDefault

    styleDefault: () => void;
    • Use the default statusbar (dark text, for light backgrounds).

    method styleLightContent

    styleLightContent: () => void;
    • Use the lightContent statusbar (light text, for dark backgrounds).

    Package Files (1)

    Dependencies (1)

    Dev Dependencies (0)

    No dev dependencies.

    Peer Dependencies (2)

    Badge

    To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

    You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@ionic-native/status-bar.

    • Markdown
      [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@ionic-native/status-bar)
    • HTML
      <a href="https://www.jsdocs.io/package/@ionic-native/status-bar"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>