Skip to content

polyfill-hq/capacitor-plugin-safe-area

 
 

Repository files navigation

capacitor-plugin-safe-area

a capacitor V3/V4 plugin to get safeArea info on Android and IOS

Install

npm install capacitor-plugin-safe-area
npx cap sync

Useage

import { SafeArea } from 'capacitor-plugin-safe-area';

SafeArea.getSafeAreaInsets().then(({ insets }) => {
  console.log(insets);
});

SafeArea.getStatusBarHeight().then(({statusBarHeight}) => {
  console.log(statusBarHeight, 'statusbarHeight');
})

API

getSafeAreaInsets()

getSafeAreaInsets() => Promise<SafeAreaInsets>

Returns: Promise<SafeAreaInsets>


getStatusBarHeight()

getStatusBarHeight() => Promise<StatusBarInfo>

Returns: Promise<StatusBarInfo>


Interfaces

SafeAreaInsets

Prop Type
insets SafeArea

SafeArea

Prop Type
top number
right number
bottom number
left number

StatusBarInfo

Prop Type
statusBarHeight number

About

A capacitor 3/4 plugin to get Statusbar Height on Android and get SafeArea info on IOS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 40.4%
  • Swift 30.4%
  • TypeScript 10.0%
  • Ruby 8.5%
  • Objective-C 6.6%
  • JavaScript 4.1%