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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@squareetlabs/capacitor-navigation-bar

v1.0.1

Published

This Capacitor Plugin allows control of the navigation bar on Android devices.

Downloads

19

Readme

Capacitor NavigationBar

This is a capacitor plugin to control the navigation bar on Android devices.

Install

npm install @squareetlbas/capacitor-navigation-bar
ionic cap sync

This plugin is for Capacitor and allows control of the navigation bar on Android devices.

Summary

The Capacitor NavigationBar plugin is designed to provide an easy way to control the navigation bar on Android devices, allowing you to hide, show, change its color, and make it transparent.

API Docs

For a more in-depth look into the different parameters for methods, along with the corresponding types. Please look into a breakdown of the API:

API Documentation

Methods

  • hide()
    Hides the navigation bar.

    import { Plugins } from '@capacitor/core';
    const { NavigationBar } = Plugins;
    
    NavigationBar.hide();
  • show()
    Shows the navigation bar.

    import { Plugins } from '@capacitor/core';
    const { NavigationBar } = Plugins;
    
    NavigationBar.show();
  • setTransparency(options: { isTransparent: boolean })
    Sets the transparency of the navigation bar.

    import { Plugins } from '@capacitor/core';
    const { NavigationBar } = Plugins;
    
    NavigationBar.setTransparency({ isTransparent: true });
  • setColor(options: { color: string, darkButtons: boolean })
    Sets the color of the navigation bar and the style of the buttons (light or dark).

    import { Plugins } from '@capacitor/core';
    const { NavigationBar } = Plugins;
    
    NavigationBar.setColor({ color: '#FF0000', darkButtons: true });
  • getColor()
    Gets the current color of the navigation bar.

    import { Plugins } from '@capacitor/core';
    const { NavigationBar } = Plugins;
    
    const color = await NavigationBar.getColor();
    console.log(color); // { color: '#FF0000' }

Listeners

  • addListener(event: 'onShow', listenerFunc: () => void)
    Event fired after the navigation bar is displayed.

    import { Plugins } from '@capacitor/core';
    const { NavigationBar } = Plugins;
    
    NavigationBar.addListener('onShow', () => {
    console.log('Navigation bar is shown');
    });
  • addListener(event: 'onHide', listenerFunc: () => void)
    Event fired after the navigation bar is hidden.

    import { Plugins } from '@capacitor/core';
    const { NavigationBar } = Plugins;
    
    NavigationBar.addListener('onHide', () => {
    console.log('Navigation bar is hidden');
    });
  • addListener(event: 'onColorChange', listenerFunc: (returnObject: { color: string }) => void)
    Event fired after the navigation bar color is changed.

import { Plugins } from '@capacitor/core';
const { NavigationBar } = Plugins;

NavigationBar.addListener('onColorChange', (info) => {
console.log('Navigation bar color changed to', info.color);
});

More In-Depth Review of the Plugin

The Capacitor NavigationBar plugin provides an efficient and easy way to control the navigation bar on Android devices. With methods to hide, show, change the color, and adjust the transparency, it offers great flexibility and control over your app's user interface.

Limitations

  • This plugin is designed specifically for Android devices and has no effect on iOS.
  • Full transparency of the navigation bar is only supported on Android R (11) and above. On earlier versions, you can use the FLAG_LAYOUT_NO_LIMITS flag to achieve a similar effect.