Gathering detailed insights and metrics for react-native-navigation-bar-color
Gathering detailed insights and metrics for react-native-navigation-bar-color
Gathering detailed insights and metrics for react-native-navigation-bar-color
Gathering detailed insights and metrics for react-native-navigation-bar-color
npm install react-native-navigation-bar-color
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
278 Stars
63 Commits
52 Forks
4 Watching
4 Branches
11 Contributors
Updated on 28 Oct 2024
Java (90.98%)
JavaScript (9.02%)
Cumulative downloads
Total Downloads
Last day
-8.2%
2,278
Compared to previous day
Last week
0.6%
11,071
Compared to previous week
Last month
-0.8%
48,598
Compared to previous month
Last year
-12.6%
687,980
Compared to previous year
No dependencies detected.
React Native Navigation Bar Color Change is a React Native library for change color of navigation/Bottom bar on Android.
$ yarn add react-native-navigation-bar-color
or
$ npm install react-native-navigation-bar-color --save
$ yarn add react-native-navigation-bar-color
or
$ npm install react-native-navigation-bar-color --save
android/app/src/main/java/[...]/MainApplication.java
import com.thebylito.navigationbarcolor.NavigationBarColorPackage;
to the imports at the top of the filenew NavigationBarColorPackage()
to the list returned by the getPackages()
methodandroid/settings.gradle
:
include ':react-native-navigation-bar-color'
project(':react-native-navigation-bar-color').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-navigation-bar-color/android')
android/app/build.gradle
:
implementation project(':react-native-navigation-bar-color')
1import React from 'react'; 2import {View, Text, Button} from 'react-native'; 3import changeNavigationBarColor, { 4 hideNavigationBar, 5 showNavigationBar, 6} from 'react-native-navigation-bar-color'; 7 8export default function App() { 9 const setNavigationColor = color => { 10 changeNavigationBarColor(color); 11 }; 12 const hideNavigation = () => { 13 hideNavigationBar(); 14 }; 15 16 const showNavigation = () => { 17 showNavigationBar(); 18 }; 19 20 const testSetTranslucent = () => { 21 changeNavigationBarColor('translucent', false); 22 }; 23 24 const testSetTransparent = () => { 25 changeNavigationBarColor('transparent', true); 26 }; 27 28 return ( 29 <View 30 style={{ 31 flex: 1, 32 justifyContent: 'space-around', 33 alignContent: 'center', 34 alignItems: 'center', 35 backgroundColor: 'cyan', 36 }}> 37 <Button title="Set transparent" onPress={testSetTransparent} /> 38 <Button title="Set translucent" onPress={testSetTranslucent} /> 39 <Button 40 title="Set color red" 41 onPress={() => { 42 setNavigationColor('red'); 43 }} 44 /> 45 <Button 46 title="Set color blue" 47 onPress={() => { 48 setNavigationColor('blue'); 49 }} 50 /> 51 <Button 52 title="Set color ligth" 53 onPress={() => { 54 changeNavigationBarColor('#ffffff', true); 55 }} 56 /> 57 <Button title="Hide bar" onPress={hideNavigation} /> 58 <Button title="Show bar" onPress={showNavigation} /> 59 <Text>Hello Word!</Text> 60 </View> 61 ); 62}
changeNavigationBarColor(color, Boolean(light icon color), Boolean(animated - default is true))
: (Android)Change color of Navigation/Bottom bar. color can be a "translucent" | "transparent" | HEX color, or name.
ex: green, blue, #80b3ff, #ffffff....
Light is true? icons will be dark.
Promise
1 example = async () => { 2 try{ 3 const response = await changeNavigationBarColor('#80b3ff'); 4 console.log(response)// {success: true} 5 }catch(e){ 6 console.log(e)// {success: false} 7 } 8 9 };
1 example = async () => { 2 try{ 3 const response = await changeNavigationBarColor('#80b3ff', true); 4 console.log(response)// {success: true} 5 }catch(e){ 6 console.log(e)// {success: false} 7 } 8 9 };
hideNavigationBar()
: (Android)Hide Navigation Bar
1 import { hideNavigationBar } from 'react-native-navigation-bar-color'; 2 ... 3 hide = () => { 4 hideNavigationBar(); 5 };
showNavigationBar()
: (Android)Show Navigation Bar
1 import { showNavigationBar } from 'react-native-navigation-bar-color'; 2 ... 3 show = () => { 4 showNavigationBar(); 5 };
MIT
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 6/19 approved changesets -- score normalized to 3
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn Morereact-native-system-navigation-bar
React Native lets you customize the navigation bar for Android.
expo-navigation-bar
Modify and observe the native navigation bar on Android devices.
@react-navigation/native
React Native integration for React Navigation
@react-navigation/native-stack
Native stack navigator using react-native-screens