A simple React Native native module to control the Status Bar and Navigation Bar colors on Android.
npm install react-native-libsor
yarn add react-native-libsimport { setStatusBarColor, setNavigationBarColor } from 'react-native-libs';
// Change Status Bar color
setStatusBarColor('#1E90FF', true);
// Change Navigation Bar color
setNavigationBarColor('#FFFFFF', false);Sets the Android status bar color.
| Parameter | Type | Description |
|---|---|---|
color |
string | Hex color value (e.g. #FFFFFF) |
lightIcons |
boolean | true for light icons, false for dark icons |
Example:
setStatusBarColor('#000000', true);Sets the Android navigation bar color.
| Parameter | Type | Description |
|---|---|---|
color |
string | Hex color value (e.g. #FFFFFF) |
lightIcons |
boolean | true for light icons, false for dark icons |
Example:
setNavigationBarColor('#FFFFFF', false);| Platform | Supported |
|---|---|
| Android | Yes |
| iOS | No |
- This library works on Android only.
- Make sure your app theme does not override system bar colors.
- Some older Android versions may have limited support for icon color changes.
Pull requests are welcome! Feel free to open an issue if you find a bug or want to suggest a feature.
MIT License