2.1.1 • Published 9 months ago

rn-statusbar-height v2.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
9 months ago

rn-statusbar-height

npm version npm downloads

A library that gets statusbar height for React Native.

If you found this helpful, don't forget to leave a star 🌟.

Installation

$ npm install --save rn-statusbar-height
# OR
$ yarn add rn-statusbar-height

Usage

import { getStatusBarHeight } from 'rn-statusbar-height'

// 53 - iPhone 16 Pro Max
// 51 - iPhone 16 Pro
// 49 - iPhone 14 Pro / 14Pro Max / 15 series
// 47 - iPhone 12 / 12Pro / 13 / 13Pro / 13Pro Max / 14 / 14 Plus
// 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));

References

ovr/react-native-status-bar-height

The Screen Sizes of iPhones

Contribution

If you want to add some features, feel free to submit PR.

License

MIT.

2.1.1

9 months ago

2.1.0

9 months ago

2.0.2

1 year ago

2.0.1

1 year ago

2.0.0

1 year ago

1.0.1

2 years ago

1.0.0

2 years ago