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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@capawesome/capacitor-android-edge-to-edge-support

v8.0.0

Published

Capacitor plugin to support edge-to-edge display on Android.

Readme

@capawesome/capacitor-android-edge-to-edge-support

Capacitor plugin to support edge-to-edge display on Android with advanced features like setting the background color of the status bar and navigation bar.

| Before | After | Before | After | | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- | | | | | |

Attention: Despite its name, this plugin doesn't enable edge-to-edge mode by default. Instead, it preserves the traditional app behavior by applying proper insets to the webview, preventing Android's edge-to-edge changes from affecting apps that haven't been designed to support it.

Compatibility

| Plugin Version | Capacitor Version | Status | | -------------- | ----------------- | -------------- | | 8.x.x | >=8.x.x | Active support |

Installation

npm install @capawesome/capacitor-android-edge-to-edge-support
npx cap sync

Android

If you are using the Capacitor Keyboard plugin, make sure to set the resizeOnFullScreen property to false (default) in your Capacitor Configuration file:

{
  "plugins": {
    "Keyboard": {
      "resizeOnFullScreen": false
    }
  }
}

Otherwise, the web view will be resized to fit the screen, which may cause issues with this plugin, see this comment.

Configuration

| Prop | Type | Description | Since | | ------------------------ | ------------------- | ----------------------------------------------------------------------------------------------------------- | ----- | | backgroundColor | string | The hexadecimal color to set as the background color of the status bar and navigation bar. | 7.1.0 | | navigationBarColor | string | The hexadecimal color to set as the background color of the navigation bar area. Only available on Android. | 8.0.0 | | statusBarColor | string | The hexadecimal color to set as the background color of the status bar area. Only available on Android. | 8.0.0 |

Examples

In capacitor.config.json:

{
  "plugins": {
    "EdgeToEdge": {
      "backgroundColor": "#ffffff",
      "navigationBarColor": "#000000",
      "statusBarColor": "#ffffff"
    }
  }
}

In capacitor.config.ts:

/// <reference types="@capawesome/capacitor-android-edge-to-edge-support" />

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

const config: CapacitorConfig = {
  plugins: {
    EdgeToEdge: {
      backgroundColor: "#ffffff",
      navigationBarColor: "#000000",
      statusBarColor: "#ffffff",
    },
  },
};

export default config;

Usage

The plugin only needs to be installed. It applies insets to the web view to support edge-to-edge display on Android. The plugin also provides a method to set the background color of the status bar and navigation bar. It's recommended to use this method in combination with the Status Bar plugin.

import { EdgeToEdge } from '@capawesome/capacitor-android-edge-to-edge-support';
import { SystemBars, SystemBarsStyle } from '@capacitor/status-bar';

const enable = async () => {
  await EdgeToEdge.enable();
};

const disable = async () => {
  await EdgeToEdge.disable();
};

const getInsets = async () => {
  const result = await EdgeToEdge.getInsets();
  console.log('Insets:', result);
};

const setDarkStyle = async () => {
  await SystemBars.setStyle({ style: SystemBarsStyle.Dark });
  await EdgeToEdge.setBackgroundColor({ color: '#000000' });
};

const setLightStyle = async () => {
  await SystemBars.setStyle({ style: SystemBarsStyle.Light });
  await EdgeToEdge.setBackgroundColor({ color: '#FFFFFF' });
};

API

disable()

disable() => Promise<void>

Disable the edge-to-edge mode.

Only available on Android.

Since: 7.2.0


enable()

enable() => Promise<void>

Enable the edge-to-edge mode.

Only available on Android.

Since: 7.2.0


getInsets()

getInsets() => Promise<GetInsetsResult>

Return the insets that are currently applied to the webview.

Only available on Android.

Returns: Promise<GetInsetsResult>

Since: 7.2.0


setBackgroundColor(...)

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

Set the background color of the status bar and navigation bar.

Only available on Android.

| Param | Type | | ------------- | ------------------------------------------------------------------------------- | | options | SetBackgroundColorOptions |

Since: 7.0.0


setNavigationBarColor(...)

setNavigationBarColor(options: SetNavigationBarColorOptions) => Promise<void>

Set the background color of the navigation bar area.

Only available on Android.

| Param | Type | | ------------- | ------------------------------------------------------------------------------------- | | options | SetNavigationBarColorOptions |

Since: 8.0.0


setStatusBarColor(...)

setStatusBarColor(options: SetStatusBarColorOptions) => Promise<void>

Set the background color of the status bar area.

Only available on Android.

| Param | Type | | ------------- | ----------------------------------------------------------------------------- | | options | SetStatusBarColorOptions |

Since: 8.0.0


Interfaces

GetInsetsResult

| Prop | Type | Description | Since | | ------------ | ------------------- | ---------------------------------------------------------------------------- | ----- | | bottom | number | The bottom inset that was applied to the webview. Only available on Android. | 7.2.0 | | left | number | The left inset that was applied to the webview. Only available on Android. | 7.2.0 | | right | number | The right inset that was applied to the webview. Only available on Android. | 7.2.0 | | top | number | The top inset that was applied to the webview. Only available on Android. | 7.2.0 |

SetBackgroundColorOptions

| Prop | Type | Description | Since | | ----------- | ------------------- | ------------------------------------------------------------------------------------------ | ----- | | color | string | The hexadecimal color to set as the background color of the status bar and navigation bar. | 7.0.0 |

SetNavigationBarColorOptions

| Prop | Type | Description | Since | | ----------- | ------------------- | -------------------------------------------------------------------------------- | ----- | | color | string | The hexadecimal color to set as the background color of the navigation bar area. | 8.0.0 |

SetStatusBarColorOptions

| Prop | Type | Description | Since | | ----------- | ------------------- | ---------------------------------------------------------------------------- | ----- | | color | string | The hexadecimal color to set as the background color of the status bar area. | 8.0.0 |

FAQ

What about Capacitor 8's built-in edge-to-edge support?

Capacitor 8 introduced native edge-to-edge functionality through the internal SystemBars plugin. While this covers many common scenarios, this plugin addresses additional edge cases that aren't yet fully resolved in the Capacitor core implementation. We plan to deprecate this plugin once all edge cases are properly handled in Capacitor core.

Is this plugin compatible with Capacitor's SystemBars API?

Yes, this plugin is partially compatible with the new SystemBars API introduced in Capacitor 8. For example, methods like setStyle() from the SystemBars API are supported and can be used alongside this plugin without conflicts.

Changelog

See CHANGELOG.md.

License

See LICENSE.