Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-iphone-x-helper

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-iphone-x-helper

A library to help you design your react-native app for the iPhone X

  • 1.3.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
461K
increased by5.83%
Maintainers
1
Weekly downloads
 
Created

What is react-native-iphone-x-helper?

The react-native-iphone-x-helper package provides utilities to help handle the layout and design issues specific to iPhone X and later models with notches and home indicator areas. It helps developers ensure their apps look good and function well on these devices.

What are react-native-iphone-x-helper's main functionalities?

getStatusBarHeight

This function returns the height of the status bar, which can vary depending on the device. It helps in adjusting the layout to avoid overlapping with the status bar.

const { getStatusBarHeight } = require('react-native-iphone-x-helper');
const statusBarHeight = getStatusBarHeight();
console.log(statusBarHeight);

getBottomSpace

This function returns the height of the bottom space, which is the area occupied by the home indicator on iPhone X and later models. It helps in adjusting the layout to avoid overlapping with the home indicator.

const { getBottomSpace } = require('react-native-iphone-x-helper');
const bottomSpace = getBottomSpace();
console.log(bottomSpace);

isIphoneX

This function checks if the device is an iPhone X or later model. It can be used to conditionally apply styles or layouts specific to these devices.

const { isIphoneX } = require('react-native-iphone-x-helper');
const isX = isIphoneX();
console.log(isX);

Other packages similar to react-native-iphone-x-helper

Keywords

FAQs

Package last updated on 08 Nov 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc