Skip to content
Small library that helps you to get status bar height, P.S 📱X supported ❤️
Branch: master
Clone or download
Latest commit 0f0e21e Mar 18, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.flowconfig Fix: index.js.flow Mar 16, 2019
.gitignore Welcome 😺 Sep 24, 2017
LICENSE Welcome 😺 Sep 24, 2017
README.md added web support Nov 26, 2018
index.d.ts Make useAndroid optional in TypeScript Mar 18, 2019
index.js Fix: Extract flow types to definition file #10 Mar 16, 2019
index.js.flow Fix: Make useAndroid optional in Flow Mar 18, 2019
package-lock.json 2.3.1 Mar 18, 2019
package.json 2.3.1 Mar 18, 2019
tsconfig.json Feature: Introduce types for TypeScript Mar 16, 2019

README.md

react-native-status-bar-height

Small library that helps you to get status bar height

P.S 📱X supported ❤️

Install

$ npm install --save react-native-status-bar-height
# OR
$ yarn add react-native-status-bar-height

Usage getStatusBarHeight(skipAndroid: boolean = false)

import { getStatusBarHeight } from 'react-native-status-bar-height';

// 44 - on iPhoneX
// 20 - on iOS device
// X - on Android platfrom (runtime value)
// 0 - on all other platforms (default)
console.log(getStatusBarHeight());

// will be 0 on Android, because You pass true to skipAndroid
console.log(getStatusBarHeight(true));

License

This project is open-sourced software licensed under the MIT License.

See the LICENSE file for more information.

You can’t perform that action at this time.