@polyfillhq/capacitor-plugin-safe-area
TypeScript icon, indicating that this package has built-in type declarations

0.0.7 • Public • Published

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

/@polyfillhq/capacitor-plugin-safe-area/

    Package Sidebar

    Install

    npm i @polyfillhq/capacitor-plugin-safe-area

    Weekly Downloads

    8

    Version

    0.0.7

    License

    MIT

    Unpacked Size

    24.1 kB

    Total Files

    27

    Last publish

    Collaborators

    • kayone