# react-native-status-bar-height
**Repository Path**: rn-mi/react-native-status-bar-height
## Basic Information
- **Project Name**: react-native-status-bar-height
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-02-27
- **Last Updated**: 2025-06-20
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
@ohmi/react-native-status-bar-height
> [!TIP] [Gitee 地址](https://gitee.com/rn-mi/react-native-status-bar-height)
## 介绍
本项目基于[react-native-status-bar-height](https://github.com/ovr/react-native-status-bar-height)开发。
## 安装与使用
#### **npm**
```bash
npm install --save @ohmi/react-native-status-bar-height
```
#### **yarn**
```bash
yarn add @ohmi/react-native-status-bar-height
```
Usage `getStatusBarHeight(skipAndroid: boolean = false)`
```js
import { getStatusBarHeight } from "react-native-status-bar-height";
// 44 - on iPhone X
// 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));
```
## Link
无需 link
## 约束与限制
无
## 规格表
| Name | Description | Type | Required | Platform | HarmonyOS Support |
| -------------------- | ------------------- | -------- | -------- | -------- | ----------------- |
| getStatusBarHeight | 获取状态栏高度 | 静态方法 | no | All | 支持 |
| isIPhoneX | 判断是 IPhoneX | 静态方法 | no | All | 支持 |
| isIPhoneXMax | 判断是 IPhoneXMax | 静态方法 | no | All | 支持 |
| isIPhone12 | 判断是 IPhone12 | 静态方法 | no | All | 支持 |
| isIPhone12Max | 判断是 IPhone12Max | 静态方法 | no | All | 支持 |
| isIPhoneWithMonobrow | 判断是刘海屏 iphone | 静态方法 | no | All | 支持 |
| isExpo | 判断是 Expo 环境 | 静态方法 | no | All | 支持 |
## 遗留问题
无
## 开源协议
本项目基于 [MIT License (MIT)](https://gitee.com/rn-mi/react-native-status-bar-height/blob/master/LICENSE) ,请自由地享受和参与开源。