# Safe Areas API

exposes safe-area padding (device notches + host chrome) so your layout never collides with host UI. The SDK initializes automatically on import—read the safe area when you need it and apply it to your layout.

## Quick Start

```typescript
import RundotGameAPI from '@series-inc/rundot-game-sdk/api'

const safeArea = RundotGameAPI.system.getSafeArea()
applyInsets(safeArea)
```

## Layout Tips

* Combine safe-area padding with your own gameplay gutters— just guarantees you won't overlap system chrome.
* Treat `RundotGameAPI.system.getSafeArea()` as the source of truth (it includes both device safe areas and host chrome).

## Best Practices

* Keep your core canvas anchored inside the computed safe rectangle; place non-interactive backgrounds outside.
* Mirror padding to physics or hitbox calculations so gameplay surfaces match UI boundaries.
* Persist the merged insets in your state store to avoid recalculating for every layout component.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://series-1.gitbook.io/rundot-docs/v5.15.0/readme/safe_area.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
