useSafeArea
Returns the safe area insets for the current device in pixels. These values represent the areas of the screen obscured by system UI such as the home indicator on iOS or the navigation bar on Android. Use these values to ensure your content is not hidden behind system chrome.
The insets are injected by the Shop app and work reliably on both iOS and Android. The equivalent CSS custom properties (--safe-area-inset-top, --safe-area-inset-right, --safe-area-inset-bottom, --safe-area-inset-left) are also available for use in stylesheets.
Your Mini should handle all four edges to ensure correct rendering across devices and future layout changes.
Anchor to useSafeAreause Safe Area()
use Safe Area()
SafeAreaInsetsSafeAreaInsets
SafeAreaInsets
- bottom
number - left
number - right
number - top
number
Was this page helpful?