Giter Site home page Giter Site logo

effektsvk / react-native-safearea-height Goto Github PK

View Code? Open in Web Editor NEW

This project forked from devym-37/react-native-safearea-height

0.0 0.0 0.0 749 KB

Small library that helps you to get status bar height, P.S 📱X supported ❤️

License: MIT License

JavaScript 37.33% TypeScript 62.67%

react-native-safearea-height's Introduction

ovr Fork Version

Original https://github.com/ovr/react-native-status-bar-height

react-native-safearea-height

Small library that helps you to get status bar height

P.S :iPhone:X / iPhone 12 / iPhone 14Pro supported ❤️

Install

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

Usage getStatusBarHeight(skipAndroid: boolean = false)

import { getStatusBarHeight } from "react-native-safearea-height";

// 59 - 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));

reference safeArea size url

License

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

See the LICENSE file for more information.

react-native-safearea-height's People

Contributors

ovr avatar devym-37 avatar fabiodamasceno avatar piu130 avatar lex111 avatar mk0116 avatar dependabot[bot] avatar tykus160 avatar zh5 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.