Get Safe Area - iOS

Retrieve safe area heights to adjust UI components and avoid overlaps with system areas like the notch or home indicator.

circle-info

You'll need to import the javascript file in your website before starting from this link.

window.WTN.getSafeArea({
    callback: function(data){
        //Contains data of the safe area settings
    }
});

//Response Data
{
  "type":"getSafeArea",
  "top" : 150,
  "bottom" : 102, 
  "topSafeArea": true/false,
  "bottomSafeArea": true/false
}

The response shows if the top or bottom safe area is there and the value for it.

Feature added in iOS on 13/06/25

Last updated