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

@nativescript-community/systemui

v1.1.23

Published

Provides API for changing the styles of SystemUI (StatusBar, NavigationBar...) on iOS.

Downloads

439

Readme

NativeScript System UI

A NativeScript plugin to change System UI.

IOS

To show/hide the statusBar you need to have UIViewControllerBasedStatusBarAppearance set to false in your Info.plist

Usage

npm install @nativescript-community/systemui --save

If you are using version ^1.0.0 then we now use mixins

import { installMixins } from '@nativescript-community/systemui';
installMixins();

Then new properties are added to the Page class

  • statusBarColor (css property status-bar-color)
  • navigationBarColor (css property navigation-bar-color)

For versions < 1.0.0

Then in your NativeScript project .xml file, add the namespace for the plugin. I'm calling it "x" here, but you can name it anything you want.

iOS only supports a list of settings (default, light, dark, opaque), not a specific color. Android will support any hex background color, but you cannot change the text color on the status bar.

<Page xmlns="http://schemas.nativescript.org/tns.xsd"
      xmlns:x="@nativescript-community/systemui"> 
      
      <!-- Use the tag with StatusBar to style it 
           Available ios settings:
           default 
           light 
           dark
           opaque
      -->
      <x:StatusBar ios:barStyle="light" barColor="#00A7DC" />
      <x:NavigationBar barColor="#00A7DC" />
</Page>

Those settings, combined with an ActionBar that has background-color: #00C0F5 will give you...

status-bar-light

Note The SystemUI plugin will not set the color of the StatusBar on iOS if you don't have an ActionBar as well. If you want to set the color of the StatusBar in NativeScript without having an ActionBar, you can set it to the page background color by setting backgroundSpanUnderStatusBar="true". Otherwise you will have a white StatusBar no matter what you do.

With Vue.js

In your root app.js:

import StatusBarPlugin from '@nativescript-community/systemui/vue';
Vue.use(StatusBarPlugin);

In your component:

<Page class="page" actionBarHidden="true" backgroundSpanUnderStatusBar="true">
      <StatusBar barColor="#32475b" />
      <NavigationBar barColor="#32475b" />
<Page/>

That's is.

Development workflow

If you would like to contribute to this plugin in order to enabled the repositories code for development follow this steps:

  • Fork the repository locally
  • Open the repository in your favorite terminal
  • Navigate to the src code that contains the plugin's code cd /src
  • Execute the npm script nmp run build.wrappers or npm run build.wrappers.watch
  • When running the Vanila NativeScript demo app execute: npm run demo.android or npm run demo.ios
  • When running the Angular NativeScript demo app execute: npm run demo.angular.android or npm run demo.angular.ios