For the complete documentation index, see llms.txt. This page is also available as Markdown.

getSafeAreaInsets

기능 설명

현재 Safe Area insets 값을 동기적으로 가져와요. 노치나 홈 인디케이터처럼 콘텐츠가 가려질 수 있는 영역의 여백을 확인할 때 사용해요.

타입

getSafeAreaInsets(): SafeAreaInsets;

Params

없음.

Response

type SafeAreaInsets = {
  top: number;
  left: number;
  right: number;
  bottom: number;
};

예시 코드

import { SafeArea } from "@apps-in-toss/web-framework";

const insets = SafeArea.get();

document.body.style.paddingTop = `${insets.top}px`;
document.body.style.paddingBottom = `${insets.bottom}px`;

도움이 되었나요?