react-native-edge-to-edge
Effortlessly enable edge-to-edge display in React Native, allowing your Android (v6 and above) app content to flow seamlessly beneath the system bars.
Credits
This project has been built and is maintained thanks to the support from Expo.
Support
This library follows the React Native releases support policy.
It is supporting the latest version, and the two previous minor series.
Motivations
Android 15
Recently, Google introduced a significant change: apps targeting SDK 35 will have edge-to-edge display enforced by default on Android 15+. Google is likely to mandate that app updates on the Play Store target SDK 35 starting on August 31, 2025. This assumption is based on the previous years' requirements following a similar timeline.
Consistency
iOS has long used edge-to-edge displays, so adopting this design across all platforms ensures a consistent user experience. It also simplifies managing safe areas, eliminating the need for special cases specific to Android.
Immersive mode
Immersive mode allows you to hide the status and navigation bars, making it ideal for full-screen experiences. Currently, the built-in StatusBar
component uses FLAG_FULLSCREEN
, a flag that has been deprecated since Android 11.
Installation
$ npm i -S react-native-edge-to-edge
$ yarn add react-native-edge-to-edge
Pick a parent theme
This library requires you to update the parent of your Android AppTheme
to an edge-to-edge version. Don't worry, it's very easy to understand! You just need to choose a theme based on the current value:
If you currently have… | …you should use |
---|
Theme.AppCompat.DayNight.NoActionBar | Theme.EdgeToEdge |
Theme.MaterialComponents.DayNight.NoActionBar | Theme.EdgeToEdge.Material2 |
Theme.Material3.DayNight.NoActionBar | Theme.EdgeToEdge.Material3 |
Theme.Material3.DynamicColors.DayNight.NoActionBar | Theme.EdgeToEdge.Material3.Dynamic |
Theme.AppCompat.Light.NoActionBar | Theme.EdgeToEdge.Light |
Theme.MaterialComponents.Light.NoActionBar | Theme.EdgeToEdge.Material2.Light |
Theme.Material3.Light.NoActionBar | Theme.EdgeToEdge.Material3.Light |
Theme.Material3.DynamicColors.Light.NoActionBar | Theme.EdgeToEdge.Material3.Dynamic.Light |
Expo
Add the library plugin in your app.json
config file and create a new build 👷:
{
"expo": {
"plugins": [
[
"react-native-edge-to-edge",
{
"android": {
"parentTheme": "Light",
"enforceNavigationBarContrast": false
}
}
]
]
}
}
📌 The available plugins options are:
type ParentTheme =
| "Default"
| "Material2"
| "Material3"
| "Material3.Dynamic"
| "Light"
| "Material2.Light"
| "Material3.Light"
| "Material3.Dynamic.Light";
type Options = {
android?: {
parentTheme?: ParentTheme;
enforceNavigationBarContrast?: boolean;
};
};
[!NOTE]
This library is not yet supported in the Expo Go sandbox app.
Bare React Native
Edit your android/app/src/main/res/values/styles.xml
file to inherit from one of the provided themes:
<resources>
<style name="AppTheme" parent="Theme.EdgeToEdge">
<item name="enforceNavigationBarContrast">false</item>
</style>
</resources>
Considerations
Transparent navigation bar
By default, this library adopts Android 15 defaults: a fully transparent status bar, a fully transparent gesture navigation bar, and a semi-opaque button navigation bar. To enforce full transparency in all cases, set the enforceNavigationBarContrast
option to false
.
Note that by doing so, you will need to manage the navigation bar style (using SystemBars
) in the same way you handle the status bar.
Keyboard management
Enabling edge-to-edge display disrupts Android keyboard management (android:windowSoftInputMode="adjustResize"
), requiring an alternative solution. While KeyboardAvoidingView
is a viable option, we recommend using react-native-keyboard-controller for its enhanced capabilities.
Safe area management
Effective safe area management is essential to prevent content from being displayed behind transparent system bars. To achieve this, we highly recommend using react-native-safe-area-context
, a well-known and trusted library.
Modal component quirks
Edge-to-edge support for the built-in Modal
component will be available in React Native 0.77. Meanwhile, we recommend using the react-navigation modals or the expo-router
modal screens.
API
<SystemBars />
A component for managing your app's system bars. Replace all occurrences of StatusBar
, expo-status-bar
and expo-navigation-bar
with it (they uses a lot of now deprecated APIs and interfere with edge-to-edge).
import { SystemBars } from "react-native-edge-to-edge";
type Style = "auto" | "light" | "dark";
type SystemBarsProps = {
style?: Style | { statusBar?: Style; navigationBar?: Style };
hidden?: boolean | { statusBar?: boolean; navigationBar?: boolean };
};
const App = () => (
<>
<SystemBars style="light" />
{/* … */}
</>
);
SystemBars.pushStackEntry
const entry: SystemBarsEntry = SystemBars.pushStackEntry(
props ,
);
SystemBars.popStackEntry
SystemBars.popStackEntry(entry );
SystemBars.replaceStackEntry
const entry: SystemBarsEntry = SystemBars.replaceStackEntry(
entry ,
props ,
);
Third-party libraries 🧩
If you're an author and your package interferes with edge-to-edge, refer to the react-native-is-edge-to-edge
README.md
for compatibility instructions.
Troubleshooting 🤔
The system bars stays opaque
Until third-party libraries officially add support for react-native-edge-to-edge
to set these options automatically, you may need to adjust them manually to prevent interference with the library.
For example, make sure to set react-native-reanimated
useAnimatedKeyboard
isStatusBarTranslucentAndroid
and isNavigationBarTranslucentAndroid
to true
(until this PR is merged), or to replace all occurrences of the built-in StatusBar
, expo-status-bar
and expo-navigation-bar
with SystemBars
.
The navigation bar style is erratic
There's currently an open issue with the Android 15 emulator image regarding the navigation bar style when it is is fully transparent. This issue does not occur on physical devices.