# react-native-safe-area-context — card for AI agents

Handle safe areas in React Native on iOS, Android and web platforms.

Category: Desktop and mobile apps · npm package `react-native-safe-area-context` · latest version 5.11.0 (checked 2026-11-01)
Install: `npm install react-native-safe-area-context`
License: MIT (permissive)

In your own product (generator, app, hosted service): **yes**. Permissive license: ship it inside your own product, closed or open source, and keep its license and copyright notice.

## Rules for AI agents (paste into AGENTS.md or CLAUDE.md)

## react-native-safe-area-context
- To control layout yourself, read the safe area insets in JavaScript and set padding or margins from them. The site contrasts this with "calculating offsets for different devices".
- Keep one safe-area code path for iOS, Android and web. The site says the API is the same and no separate per-platform logic is needed.
- When deciding whether to use `SafeAreaView`, the site says it applies insets natively, so layout "can update when the device rotates without waiting for a JavaScript update."
- If `SafeAreaView` is rendered inside iOS native sheets and the device can rotate, check the installed version. The v5.11.1 release notes list a fix to "keep SafeAreaView insets current in native sheets after rotation".
- For macOS or Windows targets, note that the website says nothing about those platforms. Only the README badge lists them.

## What it is
- react-native-safe-area-context is a React Native library for safe area insets. The GitHub repository calls it "A flexible way to handle safe area insets in JS" and adds that it "Also works on Android and Web!" The repository was created on 2019-08-14 and is MIT licensed. The README's banner image carries the alt text "maintained by App&Flow". The README's About section describes App & Flow as a Montreal-based React Native engineering and consulting studio.
- The website makes three short claims. First, you use safe area insets directly from JavaScript instead of "calculating offsets for different devices", and you set the padding or margins you want. Second, the API is the same on iOS, Android and web. Third, `SafeAreaView` applies insets natively, which the site says helps when the device rotates. The README's platform badge also lists macOS and Windows.
- The README is short. Apart from badges and a one-line description, it sends readers to the documentation site at rnsac.appandflow.com. The latest release, v5.11.1, was published 2026-11-03. It contains an iOS fix for `SafeAreaView` in native sheets, plus example and chore changes.

## Caveats
- Rotation claim covers SafeAreaView only: The site makes its native rotation claim for `SafeAreaView` specifically. It does not make the same claim for insets you read in JavaScript and apply yourself.
- Site text names three platforms, not five: The website's cross-platform claim names iOS, Android and web. macOS and Windows appear only in the README badge. The sources give no further detail about those two platforms.
- Recent iOS sheet fix: The v5.11.1 notes list a fix to "keep SafeAreaView insets current in native sheets after rotation" on iOS. The notes do not say which earlier versions were affected.
- API lives off the repo page: The README has no component or hook reference. It links to the documentation site for that.

## Numbers (AgentGid data)
- Gid Score: 65.3 (#659 of all tools, 15 of 105 in its category)
- Used in 121 public projects set up for AI coding agents (1.9%)
- Downloads last week: 16,970,355 (as of 2026-11-24), +53.5% over 4 weeks
- GitHub stars: 2,768 (as of 2026-11-24)
- Last push: 2026-11-04

## Often used with
React Native 100.0%, react-native-screens 96.7%, Expo 93.4%, React Native Reanimated 83.5%, React Native Gesture Handler 81.8%, React 100.0%

## Links
- AgentGid page: https://agentgid.com/tools/react-native-safe-area-context/
- Homepage: https://github.com/AppAndFlow/react-native-safe-area-context#readme
- Repository: https://github.com/appandflow/react-native-safe-area-context
- Source: https://github.com/appandflow/react-native-safe-area-context#readme
- Source: https://github.com/appandflow/react-native-safe-area-context
- Source: https://github.com/appandflow/react-native-safe-area-context/releases
- Source: https://rnsac.appandflow.com/

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
