Skip to main content
sunpeak API

Overview

The useSafeArea hook returns the safe area insets for handling device notches, status bars, and other system UI. It is a convenience wrapper around useHostContext.
For most resources, use the <SafeArea> component instead — it applies both safe area padding and viewport height constraints automatically.

Import

Signature

Returns

return
SafeAreaInsets
Safe area insets object. Defaults to all zeros when unavailable.

Usage

Safe area insets come from McpUiHostContext.safeAreaInsets.