Safe area
CSS values and a service for keeping content clear of the notch, status bar and home indicator. import { LynxSafeArea, SAFE_AREA_INSET_TOP, SAFE_AREA_INSET_BOTTOM, SAFE_AREA_INSET_LEFT, SAFE_AREA_INSET_RIGHT } from '@blotch/angular-lynx';
Usage
In a stylesheet, write the CSS directly: padding-top: env(safe-area-inset-top);.
API
SAFE_AREA_INSET_*
The CSS env() value for each inset, for style bindings in TypeScript.
LynxSafeArea
Device facts for layouts that adapt to the safe area. Creating it throws outside Lynx, such as in unit tests, because it reads LynxSystemInfo.
LynxSafeArea.isNotchScreen
true when the host app reports a notch or screen cutout through its isNotchScreen global value. false when it reports none.
LynxSafeArea.platform
The platform, such as 'iOS' or 'Android'. Same as LynxSystemInfo.platform.
Types
PlatformType comes from @lynx-js/types:
Related
- Safe area: pad screens and fixed bars.
- System info
- Host data
