Gathering detailed insights and metrics for react-native-edge-to-edge
Gathering detailed insights and metrics for react-native-edge-to-edge
Gathering detailed insights and metrics for react-native-edge-to-edge
Gathering detailed insights and metrics for react-native-edge-to-edge
Effortlessly enable edge-to-edge display in React Native (formerly known as react-native-bars).
npm install react-native-edge-to-edge
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
606 Stars
178 Commits
21 Forks
4 Watching
1 Branches
4 Contributors
Updated on 27 Nov 2024
TypeScript (60.2%)
Kotlin (27.4%)
JavaScript (5.22%)
Ruby (4%)
Objective-C++ (2.33%)
Objective-C (0.85%)
Cumulative downloads
Total Downloads
Last day
63.5%
2,013
Compared to previous day
Last week
46.2%
8,497
Compared to previous week
Last month
860.3%
22,346
Compared to previous month
Last year
0%
24,745
Compared to previous year
Effortlessly enable edge-to-edge display in React Native, allowing your Android app content to flow seamlessly beneath the system bars.
This project has been built and is maintained thanks to the support from Expo.
This library follows the React Native releases support policy.
It is supporting the latest version, and the two previous minor series.
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.
Currently, new React Native projects target SDK 34.
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.
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.
1$ npm i -S react-native-edge-to-edge 2# --- or --- 3$ yarn add react-native-edge-to-edge
Add the library plugin in your app.json
config file and create a new build:
1{ 2 "expo": { 3+ "plugins": ["react-native-edge-to-edge"] 4 } 5}
📌 The available plugins options are:
1type Options = { 2 android?: { 3 // use an edge-to-edge version of `Theme.{MaterialComponents,Material3}.DayNight.NoActionBar` 4 parentTheme?: "Material2" | "Material3"; // optional, default is `undefined` (`Theme.EdgeToEdge`) 5 }; 6};
[!NOTE] This library is not yet supported in the Expo Go sandbox app.
Edit your android/app/src/main/res/values/styles.xml
file to inherit from one of the provided themes:
1<resources> 2 <!-- inherit from Theme.EdgeToEdge / Theme.EdgeToEdge.Material2 / Theme.EdgeToEdge.Material3 --> 3- <style name="AppTheme" parent="Theme.AppCompat.DayNight.NoActionBar"> 4+ <style name="AppTheme" parent="Theme.EdgeToEdge"> 5 <!-- … --> 6 </style> 7</resources>
Many libraries expose options that you can set to account for the transparency of status and navigation bars. For example, the useHideAnimation
hook in react-native-bootsplash
has statusBarTranslucent
and navigationBarTranslucent
options, the useAnimatedKeyboard
in react-native-reanimated
has an isStatusBarTranslucentAndroid
option, etc.
[!IMPORTANT]
Until third-party libraries officially add support forreact-native-edge-to-edge
to set these options automatically, you may need to adjust these options to prevent interference with the library.
For library authors, we provide a lightweight package called react-native-is-edge-to-edge
(note the -is-
!), which checks whether react-native-edge-to-edge
is installed, making it easy to update your library accordingly:
1import { 2 controlEdgeToEdgeValues, 3 isEdgeToEdge, 4} from "react-native-is-edge-to-edge"; 5 6const EDGE_TO_EDGE = isEdgeToEdge(); 7 8function MyAwesomeLibraryComponent({ 9 statusBarTranslucent, 10 navigationBarTranslucent, 11}) { 12 if (__DEV__) { 13 // warn the user once about unnecessary defined values 14 controlEdgeToEdgeValues({ 15 statusBarTranslucent, 16 navigationBarTranslucent, 17 }); 18 } 19 20 return ( 21 <MyAwesomeLibraryNativeComponent 22 statusBarTranslucent={EDGE_TO_EDGE || statusBarTranslucent} 23 navigationBarTranslucent={EDGE_TO_EDGE || navigationBarTranslucent} 24 // … 25 /> 26 ); 27}
If you want to check for the library's presence on the native side to bypass certain parts of your code, consider using this small utility:
1object EdgeToEdge { 2 // we cannot detect edge-to-edge, but we can detect react-native-edge-to-edge install 3 val ENABLED: Boolean = try { 4 Class.forName("com.zoontek.rnedgetoedge.EdgeToEdgePackage") 5 true 6 } catch (exception: ClassNotFoundException) { 7 false 8 } 9}
Enabling edge-to-edge display disrupts basic 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.
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.
Status bar management has never worked effectively with the built-in Modal
component (as it creates a Dialog
with a Window
instance distinct from MainActivity
). A statusBarTranslucent
prop was introduced, but it is insufficient because there is no equivalent for the navigation bar. Instead, we recommend using the react-navigation modals, which do not suffer from this issue, as they utilize react-native-screens and Fragment
behind the scenes.
<SystemBars />
A component for managing your app's system bars. This replace StatusBar
, expo-status-bar
and expo-navigation-bar
(that uses a lot of now deprecated APIs).
1import { SystemBars } from "react-native-edge-to-edge"; 2 3type SystemBarsProps = { 4 // Sets the color of the status bar content (navigation bar adjusts itself automatically) 5 // "auto" is based on current color scheme (light -> dark content, dark -> light content) 6 style?: "auto" | "light" | "dark"; 7 // Hide system bars (the navigation bar cannot be hidden on iOS) 8 hidden?: boolean | { statusBar?: boolean; navigationBar?: boolean }; 9}; 10 11const App = () => ( 12 <> 13 <SystemBars style="light" /> 14 {/* … */} 15 </> 16);
1const entry: SystemBarsEntry = SystemBars.pushStackEntry(
2 props /*: SystemBarsProps */,
3);
1SystemBars.popStackEntry(entry /*: SystemBarsEntry */);
1const entry: SystemBarsEntry = SystemBars.replaceStackEntry(
2 entry /*: SystemBarsEntry */,
3 props /*: SystemBarsProps */,
4);
No vulnerabilities found.
No security vulnerabilities found.
react-native-is-edge-to-edge
Detect react-native-edge-to-edge package install
@edge-runtime/ponyfill
A ponyfill (doesn't overwrite the native methods) to use Edge Runtime APIs in any environment.
chromium-edge-launcher
Launch latest Edge with the Devtools Protocol port open
@adobe/react-native-aepedge
Adobe Experience Platform Edge Network extension for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe.