- Brand image support
- Dark mode support 🌚
- Web support 🌐
- A new hook,
useHideAnimation, allowing you to easily animate all splash screen elements usingAnimatedorreact-native-reanimated. Create something nicer than a simple fade 🚀 - An improved CLI generator, now able to edit / output over 50 files (light and dark logos + light and dark brand images, config files…for all pixel densities!). Note that the new options require a license key 🔑
- AndroidX SplashScreen library has been replaced in order to solve a lot of known issues with it (#381, #418, #440, #456, etc).
react-native-bootsplashnow uses its own polyfill, compatible with Android 5+ (without any degraded mode). - Your Android theme status / navigation bar styles are not overwritten anymore. Guides for transparent status bar and edge-to-edge layouts have been added in the brand new FAQ.
- Android generated assets has been migrated from
mipmap-*directories todrawable-*ones. - To avoid conflicts, Android provided theme / properties has been renamed
Theme.BootSplash/Theme.BootSplash.EdgeToEdge,bootSplashBackground,bootSplashLogo,bootSplashBrandandpostBootSplashTheme. - The
durationargument has been removed fromfade()options. getVisibilityStatus()has been replaced withisVisible()(which returns aPromise<boolean>). Thetransitioningstatus does not exists anymore (when the splash screen is fading, it staysvisibleuntil complete disappearance).- The CLI now output a
bootsplash_manifest.jsonfile to share image sizes + colors with the JS thread (used byuseHideAnimation). --assets-pathCLI option has been renamed--assets-output.- React Native < 0.70 and iOS < 12.4 support has been dropped.
- ReScript bindings has been removed as I don't know how to write them. Feels free to open a PR to add it back.
👉 First, run the CLI to generate assets in updated locations!
It will also update your BootSplash.storyboard, the only change to perform on iOS.
-
Delete all
android/app/src/main/res/mipmap-*/bootsplash_logo.pngfiles. -
Edit your
android/app/build.gradlefile:
// …
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
- implementation("androidx.core:core-splashscreen:1.0.0")- Edit your
values/styles.xmlfile:
- <!-- BootTheme should inherit from Theme.SplashScreen -->
+ <!-- BootTheme should inherit from Theme.BootSplash or Theme.BootSplash.EdgeToEdge -->
- <style name="BootTheme" parent="Theme.SplashScreen">
+ <style name="BootTheme" parent="Theme.BootSplash">
- <item name="windowSplashScreenBackground">@color/bootsplash_background</item>
+ <item name="bootSplashBackground">@color/bootsplash_background</item>
- <item name="windowSplashScreenAnimatedIcon">@mipmap/bootsplash_logo</item>
+ <item name="bootSplashLogo">@drawable/bootsplash_logo</item>
- <item name="postSplashScreenTheme">@style/AppTheme</item>
+ <item name="postBootSplashTheme">@style/AppTheme</item>
</style>- Edit your
MainActivity.javafile:
@Override
protected void onCreate(Bundle savedInstanceState) {
- RNBootSplash.init(this);
+ RNBootSplash.init(this, R.style.BootTheme);
super.onCreate(savedInstanceState);
}