Calculate screen cutouts and notches to dynamically apply CSS padding.
Get physical screen insets for camera notches, punch-holes, and home bar indicators to dynamically pad your UI layout. Essential for edge-to-edge fullscreen apps.
import nativine from 'nativine';
const insets = await nativine.device.getSafeAreaInsets();
// insets -> { top: 44, bottom: 34, left: 0, right: 0 }
Returns an object with top, bottom, left, and right values in device-independent pixels (dp). Use these values to apply CSS padding or margins to avoid content being obscured by notches or system UI.
Get priority Nativine documentation and updates in your Google Search and AI Overviews.