npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ququplay/status-bar

v8.0.1

Published

The StatusBar API Provides methods for configuring the style of the Status Bar, along with showing or hiding it.

Readme

@capacitor/status-bar

The StatusBar API Provides methods for configuring the style of the Status Bar, along with showing or hiding it.

Install

npm install @capacitor/status-bar
npx cap sync

Android 16+ behavior change

For apps targeting Android 16 (API level 36) and higher using Capacitor 8, the following Status Bar configuration options no longer work:

  • overlaysWebView
  • backgroundColor

These options relied on the ability to opt out of Android’s edge-to-edge system UI behavior, which allowed apps to control how the status bar overlays and its background color.

In Android 15 (API level 35), it was still possible to opt out of this enforced behavior by setting the windowOptOutEdgeToEdgeEnforcement property in the application layout file. Without that property, the application assumed overlaysWebView as always true. See more details in the Android documentation: https://developer.android.com/reference/android/R.attr#windowOptOutEdgeToEdgeEnforcement

Starting with Android 16, this opt-out is no longer available, and the behavior is enforced by the system.
As a result, the overlaysWebView and backgroundColor configuration options no longer have any effect.

iOS Note

This plugin requires "View controller-based status bar appearance" (UIViewControllerBasedStatusBarAppearance) set to YES in Info.plist. Read about Configuring iOS for help.

The status bar visibility defaults to visible and the style defaults to Style.Default. You can change these defaults by adding UIStatusBarHidden and/or UIStatusBarStyle in Info.plist.

Example

import { StatusBar, Style } from '@capacitor/status-bar';

// iOS only
window.addEventListener('statusTap', function () {
  console.log('statusbar tapped');
});

// Display content under transparent status bar
StatusBar.setOverlaysWebView({ overlay: true });

const setStatusBarStyleDark = async () => {
  await StatusBar.setStyle({ style: Style.Dark });
};

const setStatusBarStyleLight = async () => {
  await StatusBar.setStyle({ style: Style.Light });
};

const hideStatusBar = async () => {
  await StatusBar.hide();
};

const showStatusBar = async () => {
  await StatusBar.show();
};

Configuration

These config values are available:

| Prop | Type | Description | Default | Since | | --------------------- | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- | -------------------- | ----- | | overlaysWebView | boolean | Whether the statusbar is overlaid or not. Not available on Android 15+. | true | 1.0.0 | | style | string | Style of the text of the status bar. | default | 1.0.0 | | backgroundColor | string | Color of the background of the statusbar in hex format, #RRGGBB. Doesn't work if overlaysWebView is true. Not available on Android 15+. | #000000 | 1.0.0 |

Examples

In capacitor.config.json:

{
  "plugins": {
    "StatusBar": {
      "overlaysWebView": false,
      "style": "DARK",
      "backgroundColor": "#ffffffff"
    }
  }
}

In capacitor.config.ts:

/// <reference types="@ququplay/status-bar" />

import { CapacitorConfig } from '@capacitor/cli';

const config: CapacitorConfig = {
  plugins: {
    StatusBar: {
      overlaysWebView: false,
      style: "DARK",
      backgroundColor: "#ffffffff",
    },
  },
};

export default config;

API

setStyle(...)

setStyle(options: StyleOptions) => Promise<void>

Set the current style of the status bar.

| Param | Type | | ------------- | ----------------------------------------------------- | | options | StyleOptions |

Since: 1.0.0


setBackgroundColor(...)

setBackgroundColor(options: BackgroundColorOptions) => Promise<void>

Set the background color of the status bar. Calling this function updates the foreground color of the status bar if the style is set to default, except on iOS versions lower than 17. Not available on Android 15+.

| Param | Type | | ------------- | ------------------------------------------------------------------------- | | options | BackgroundColorOptions |

Since: 1.0.0


show(...)

show(options?: AnimationOptions | undefined) => Promise<void>

Show the status bar. On iOS, if the status bar is initially hidden and the initial style is set to UIStatusBarStyleLightContent, first show call might present a glitch on the animation showing the text as dark and then transition to light. It's recommended to use Animation.None as the animation on the first call.

| Param | Type | | ------------- | ------------------------------------------------------------- | | options | AnimationOptions |

Since: 1.0.0


hide(...)

hide(options?: AnimationOptions | undefined) => Promise<void>

Hide the status bar.

| Param | Type | | ------------- | ------------------------------------------------------------- | | options | AnimationOptions |

Since: 1.0.0


getInfo()

getInfo() => Promise<StatusBarInfo>

Get info about the current state of the status bar.

Returns: Promise<StatusBarInfo>

Since: 1.0.0


setOverlaysWebView(...)

setOverlaysWebView(options: SetOverlaysWebViewOptions) => Promise<void>

Set whether or not the status bar should overlay the webview to allow usage of the space underneath it. Not available on Android 15+.

| Param | Type | | ------------- | ------------------------------------------------------------------------------- | | options | SetOverlaysWebViewOptions |

Since: 1.0.0


Interfaces

StyleOptions

| Prop | Type | Description | Since | | ----------- | --------------------------------------- | --------------------------------------------------------- | ----- | | style | Style | Style of the text of the status bar. | 1.0.0 |

BackgroundColorOptions

| Prop | Type | Description | Since | | ----------- | ------------------- | ------------------------------------------------- | ----- | | color | string | A hex color to which the status bar color is set. | 1.0.0 |

AnimationOptions

| Prop | Type | Description | Default | Since | | --------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------- | --------------------------- | ----- | | animation | Animation | The type of status bar animation used when showing or hiding. This option is only supported on iOS. | Animation.Fade | 1.0.0 |

StatusBarInfo

| Prop | Type | Description | Since | | -------------- | --------------------------------------- | ----------------------------------------- | ----- | | visible | boolean | Whether the status bar is visible or not. | 1.0.0 | | style | Style | The current status bar style. | 1.0.0 | | color | string | The current status bar color. | 1.0.0 | | overlays | boolean | Whether the statusbar is overlaid or not. | 1.0.0 |

SetOverlaysWebViewOptions

| Prop | Type | Description | Since | | ------------- | -------------------- | ----------------------------------------- | ----- | | overlay | boolean | Whether to overlay the status bar or not. | 1.0.0 |

Enums

Style

| Members | Value | Description | Since | | ------------- | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----- | | Dark | 'DARK' | Light text for dark backgrounds. | 1.0.0 | | Light | 'LIGHT' | Dark text for light backgrounds. | 1.0.0 | | Default | 'DEFAULT' | The style is based on the device appearance. If the device is using Dark mode, the statusbar text will be light. If the device is using Light mode, the statusbar text will be dark. | 1.0.0 |

Animation

| Members | Value | Description | Since | | ----------- | -------------------- | ------------------------------------------------------------- | ----- | | None | 'NONE' | No animation during show/hide. | 1.0.0 | | Slide | 'SLIDE' | Slide animation during show/hide. It doesn't work on iOS 15+. | 1.0.0 | | Fade | 'FADE' | Fade animation during show/hide. | 1.0.0 |