react-native-bootsplash vs react-native-splash-screen vs react-native-splash-screen
React Native Splash Screen Libraries Comparison
1 Year
react-native-bootsplashreact-native-splash-screenreact-native-splash-screen
What's React Native Splash Screen Libraries?

Splash screen libraries in React Native are essential for enhancing the user experience by providing a visually appealing introduction to the app while it loads. These libraries help developers implement splash screens that can display branding, logos, or animations, ensuring that users have a smooth transition into the app's main interface. They can significantly improve perceived performance and user engagement by masking loading times and creating a polished first impression.

Package Weekly Downloads Trend
Github Stars Ranking
Stat Detail
Package
Downloads
Stars
Size
Issues
Publish
License
react-native-bootsplash138,6703,911478 kB67 days agoMIT
react-native-splash-screen118,1495,65240 kB4093 years agoMIT
react-native-splash-screen118,1495,65240 kB4093 years agoMIT
Feature Comparison: react-native-bootsplash vs react-native-splash-screen vs react-native-splash-screen

Native Integration

  • react-native-bootsplash:

    react-native-bootsplash provides a native splash screen that is displayed immediately when the app is launched, before any JavaScript code is executed. This ensures a fast and smooth user experience, as it leverages native capabilities for rendering the splash screen without delays.

  • react-native-splash-screen:

    react-native-splash-screen relies on JavaScript to control the splash screen's visibility. While it allows for more customization, it may introduce a slight delay as the app loads and the JavaScript bundle is executed.

  • react-native-splash-screen:

    react-native-splash-screen relies on JavaScript to control the splash screen's visibility. While it allows for more customization, it may introduce a slight delay as the app loads and the JavaScript bundle is executed.

Customization Options

  • react-native-bootsplash:

    react-native-bootsplash offers limited customization options, focusing on a quick setup with predefined styles. It is designed for developers who want a straightforward implementation without extensive configuration.

  • react-native-splash-screen:

    react-native-splash-screen provides extensive customization options, allowing developers to define animations, transitions, and dynamic content. This flexibility is beneficial for apps that want to create a unique branding experience.

  • react-native-splash-screen:

    react-native-splash-screen provides extensive customization options, allowing developers to define animations, transitions, and dynamic content. This flexibility is beneficial for apps that want to create a unique branding experience.

Performance Impact

  • react-native-bootsplash:

    react-native-bootsplash has minimal performance impact since it displays the splash screen natively without waiting for JavaScript execution. This results in a faster perceived load time, enhancing user satisfaction.

  • react-native-splash-screen:

    react-native-splash-screen can have a performance impact due to its reliance on JavaScript. If not managed properly, it may lead to longer loading times, which could negatively affect user experience.

  • react-native-splash-screen:

    react-native-splash-screen can have a performance impact due to its reliance on JavaScript. If not managed properly, it may lead to longer loading times, which could negatively affect user experience.

Ease of Use

  • react-native-bootsplash:

    react-native-bootsplash is easy to set up and requires minimal configuration, making it suitable for developers who want to implement a splash screen quickly without deep diving into customization.

  • react-native-splash-screen:

    react-native-splash-screen may require more setup and coding effort to achieve desired effects, which can be a consideration for developers looking for a quick solution.

  • react-native-splash-screen:

    react-native-splash-screen may require more setup and coding effort to achieve desired effects, which can be a consideration for developers looking for a quick solution.

Community Support

  • react-native-bootsplash:

    react-native-bootsplash has a growing community and documentation that supports developers in implementing the library effectively, although it may not be as extensive as older libraries.

  • react-native-splash-screen:

    react-native-splash-screen has been around longer and has a larger community, providing more resources, examples, and troubleshooting help for developers.

  • react-native-splash-screen:

    react-native-splash-screen has been around longer and has a larger community, providing more resources, examples, and troubleshooting help for developers.

How to Choose: react-native-bootsplash vs react-native-splash-screen vs react-native-splash-screen
  • react-native-bootsplash:

    Choose react-native-bootsplash if you need a simple, native splash screen that can be configured easily and does not require JavaScript to manage its visibility. It is ideal for apps that prioritize performance and a seamless user experience during the app's startup process.

  • react-native-splash-screen:

    Choose react-native-splash-screen if you want more control over the splash screen's visibility and behavior through JavaScript. This package allows for more complex animations and transitions, making it suitable for apps that require dynamic content or interactions during the loading phase.

  • react-native-splash-screen:

    Choose react-native-splash-screen if you want more control over the splash screen's visibility and behavior through JavaScript. This package allows for more complex animations and transitions, making it suitable for apps that require dynamic content or interactions during the loading phase.

README for react-native-bootsplash

🚀 react-native-bootsplash

Show a splash screen during app startup. Hide it when you are ready.
For migration from the v5, check the MIGRATION.md guide.

mit licence npm version npm downloads
platform - android platform - ios

Demo Demo

Support

This library follows the React Native releases support policy.
It is supporting the latest version, and the two previous minor series.

Installation

$ npm install --save react-native-bootsplash
# --- or ---
$ yarn add react-native-bootsplash

⚠️  Don't forget going into the ios directory to execute a pod install.

Setup

Assets generation

In order to speed up the setup, we provide a CLI to generate assets, create the Android Drawable XML file and the iOS Storyboard file automatically ✨.

$ npx react-native-bootsplash generate --help
# --- or ---
$ yarn react-native-bootsplash generate --help

The command can take multiple arguments:

Usage: react-native-bootsplash generate [options] <logo>

Generate a launch screen using a logo file path (PNG or SVG)

Options:
  --project-type <string>     Project type ("detect", "bare" or "expo") (default: "detect")
  --platforms <list>          Platforms to generate for, separated by a comma (default: "android,ios,web")
  --background <string>       Background color (in hexadecimal format) (default: "#fff")
  --logo-width <number>       Logo width at @1x (in dp - we recommend approximately ~100) (default: 100)
  --assets-output <string>    Assets output directory path (default: "assets/bootsplash")
  --flavor <string>           Android flavor build variant (where your resource directory is) (default: "main")
  --html <string>             HTML template file path (your web app entry point) (default: "public/index.html")
  --license-key <string>      License key to enable brand and dark mode assets generation
  --brand <string>            Brand file path (PNG or SVG)
  --brand-width <number>      Brand width at @1x (in dp - we recommend approximately ~80) (default: 80)
  --dark-background <string>  [dark mode] Background color (in hexadecimal format)
  --dark-logo <string>        [dark mode] Logo file path (PNG or SVG)
  --dark-brand <string>       [dark mode] Brand file path (PNG or SVG)
  -h, --help                  display help for command

💪 Unlock the CLI full potential

In order to use the --brand, --brand-width and --dark-* options, you must specify a --license-key.

With it, the generator is able to output over 50 files (logo and brand images generated in all pixel densities, dark mode versions, etc.), saving you (and your company!) a massive amount of time not only at creation, but also at each adjustment ⏱️

📍 This license key grants unlimited and unrestricted usage of the generator for the buyer's purposes (meaning you can execute the assets generation as much as you want).

Gumroad button

Full command usage example

# Without license key
yarn react-native-bootsplash generate svgs/light-logo.svg \
  --platforms=android,ios,web \
  --background=F5FCFF \
  --logo-width=100 \
  --assets-output=assets/bootsplash \
  --flavor=main \
  --html=public/index.html

# With license key 🔑
yarn react-native-bootsplash generate svgs/light-logo.svg \
  --platforms=android,ios,web \
  --background=F5FCFF \
  --logo-width=100 \
  --assets-output=assets/bootsplash \
  --flavor=main \
  --html=public/index.html \
  --license-key=xxxxx \
  --brand=svgs/light-brand.svg \
  --brand-width=80 \
  --dark-background=00090A \
  --dark-logo=svgs/dark-logo.svg \
  --dark-brand=svgs/dark-brand.svg

This tool relies on the naming conventions that are used in the /example project and will therefore create the following files:

# Without license key
android/app/src/main/res/drawable-mdpi/bootsplash_logo.png
android/app/src/main/res/drawable-hdpi/bootsplash_logo.png
android/app/src/main/res/drawable-xhdpi/bootsplash_logo.png
android/app/src/main/res/drawable-xxhdpi/bootsplash_logo.png
android/app/src/main/res/drawable-xxxhdpi/bootsplash_logo.png
android/app/src/main/AndroidManifest.xml
android/app/src/main/res/values/colors.xml
android/app/src/main/res/values/styles.xml

ios/YourApp/BootSplash.storyboard
ios/YourApp/Colors.xcassets/BootSplashBackground-<hash>.colorset/Contents.json
ios/YourApp/Images.xcassets/BootSplashLogo-<hash>.imageset/Contents.json
ios/YourApp/Images.xcassets/BootSplashLogo-<hash>.imageset/logo-<hash>.png
ios/YourApp/Images.xcassets/BootSplashLogo-<hash>.imageset/logo-<hash>@2x.png
ios/YourApp/Images.xcassets/BootSplashLogo-<hash>.imageset/logo-<hash>@3x.png
ios/YourApp/Info.plist
ios/YourApp.xcodeproj/project.pbxproj

public/index.html

assets/bootsplash/manifest.json
assets/bootsplash/logo.png
assets/bootsplash/logo@1,5x.png
assets/bootsplash/logo@2x.png
assets/bootsplash/logo@3x.png
assets/bootsplash/logo@4x.png

# + Over 40 files with license key 🔑 (brand images, dark mode versions…)

With Expo

  1. Disable expo-splash-screen autolinking (in your package.json):
"expo": {
  "autolinking": {
    "exclude": [
      "expo-splash-screen"
    ]
  }
}
  1. Add the plugin in your app.json:
{
  "expo": {
    "plugins": [
-     [
-       "expo-splash-screen",
-       {
-         "image": "./assets/images/splash-icon.png",
-         "imageWidth": 200,
-         "resizeMode": "contain",
-         "backgroundColor": "#ffffff"
-       }
-     ],
+     ["react-native-bootsplash", { "assetsDir": "assets/bootsplash" }]
    ]
  }
}

📌 The available plugins options are:

type PluginOptions = {
  assetsDir?: string; // optional, default is "assets/bootsplash"
  android?: {
    parentTheme?: "TransparentStatus" | "EdgeToEdge"; // optional, default is `undefined` (`Theme.BootSplash`)
    darkContentBarsStyle?: boolean; // optional, default is `undefined`
  };
};

With bare React Native

iOS (react-native 0.79+)

Edit your ios/YourApp/AppDelegate.swift file:

import ReactAppDependencyProvider
import RNBootSplash // ⬅️ add this import

// …

class ReactNativeDelegate: RCTDefaultReactNativeFactoryDelegate {

  // …

  // ⬇️ override this method
  override func customize(_ rootView: RCTRootView) {
    super.customize(rootView)
    RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView) // ⬅️ initialize the splash screen
  }
}

iOS (react-native 0.77+)

Edit your ios/YourApp/AppDelegate.swift file:

import ReactAppDependencyProvider
import RNBootSplash // ⬅️ add this import

// …

@main
class AppDelegate: RCTAppDelegate {

  // …

  // ⬇️ override this method
  override func customize(_ rootView: RCTRootView!) {
    super.customize(rootView)
    RNBootSplash.initWithStoryboard("BootSplash", rootView: rootView) // ⬅️ initialize the splash screen
  }
}

Android

Edit your android/app/src/main/java/com/yourapp/MainActivity.kt file:

// ⬇️ add these required imports
import android.os.Bundle
import com.zoontek.rnbootsplash.RNBootSplash

// …

class MainActivity : ReactActivity() {

  // …

  override fun onCreate(savedInstanceState: Bundle?) {
    RNBootSplash.init(this, R.style.BootTheme) // ⬅️ initialize the splash screen
    super.onCreate(savedInstanceState) // super.onCreate(null) with react-native-screens
  }
}

ℹ️ Refer to previous package documentation for setup steps with React Native < 0.77.

API

hide()

Hide the splash screen (immediately, or with a fade out).

Method type

type hide = (config?: { fade?: boolean }) => Promise<void>;

Usage

import { useEffect } from "react";
import { Text } from "react-native";
import BootSplash from "react-native-bootsplash";

const App = () => {
  useEffect(() => {
    const init = async () => {
      // …do multiple sync or async tasks
    };

    init().finally(async () => {
      await BootSplash.hide({ fade: true });
      console.log("BootSplash has been hidden successfully");
    });
  }, []);

  return <Text>My awesome app</Text>;
};

isVisible()

Return the current visibility status of the native splash screen.

Method type

type isVisible = () => Promise<boolean>;

Usage

import BootSplash from "react-native-bootsplash";

BootSplash.isVisible().then((value) => console.log(value));

useHideAnimation()

A hook to easily create a custom hide animation by animating all splash screen elements using Animated, react-native-reanimated or else (similar as the video on top of this documentation).

Method type

type useHideAnimation = (config: {
  ready?: boolean; // a boolean flag to delay the animate execution (default: true)

  // the required generated assets
  manifest: Manifest; // the manifest file is generated in your assets directory
  logo?: ImageRequireSource;
  darkLogo?: ImageRequireSource;
  brand?: ImageRequireSource;
  darkBrand?: ImageRequireSource;

  // specify if you are using translucent status / navigation bars
  // in order to avoid a shift between the native and JS splash screen
  statusBarTranslucent?: boolean;
  navigationBarTranslucent?: boolean;

  animate: () => void;
}) => {
  container: ContainerProps;
  logo: LogoProps;
  brand: BrandProps;
};

Usage

import { useState } from "react";
import { Animated, Image } from "react-native";
import BootSplash from "react-native-bootsplash";

type Props = {
  onAnimationEnd: () => void;
};

const AnimatedBootSplash = ({ onAnimationEnd }: Props) => {
  const [opacity] = useState(() => new Animated.Value(1));

  const { container, logo /*, brand */ } = BootSplash.useHideAnimation({
    manifest: require("../assets/bootsplash/manifest.json"),

    logo: require("../assets/bootsplash/logo.png"),
    // darkLogo: require("../assets/bootsplash/dark-logo.png"),
    // brand: require("../assets/bootsplash/brand.png"),
    // darkBrand: require("../assets/bootsplash/dark-brand.png"),

    statusBarTranslucent: true,
    navigationBarTranslucent: false,

    animate: () => {
      // Perform animations and call onAnimationEnd
      Animated.timing(opacity, {
        useNativeDriver: true,
        toValue: 0,
        duration: 500,
      }).start(() => {
        onAnimationEnd();
      });
    },
  });

  return (
    <Animated.View {...container} style={[container.style, { opacity }]}>
      <Image {...logo} />
      {/* <Image {...brand} /> */}
    </Animated.View>
  );
};

const App = () => {
  const [visible, setVisible] = useState(true);

  return (
    <View style={{ flex: 1 }}>
      {/* content */}

      {visible && (
        <AnimatedBootSplash
          onAnimationEnd={() => {
            setVisible(false);
          }}
        />
      )}
    </View>
  );
};

This example is simple for documentation purpose (we only animate the container).
🤙 A more complex example is available in the /example folder.

FAQ

How can I have a transparent status bar, or edge-to-edge layout?

Edit your values/styles.xml file to inherit from Theme.BootSplash.TransparentStatus / Theme.BootSplash.EdgeToEdge instead of Theme.BootSplash:

<resources>

  <!-- … -->

  <!-- make BootTheme inherit from Theme.BootSplash.TransparentStatus / Theme.BootSplash.EdgeToEdge -->
  <style name="BootTheme" parent="Theme.BootSplash.EdgeToEdge">
    <!-- … -->

    <!-- optional, used to enforce the initial bars styles -->
    <!-- default is true in light mode, false in dark mode -->
    <item name="darkContentBarsStyle">true</item>
  </style>

</resources>

Why are both light and dark assets inlined in my index.html?

For the sake of simplicity. Since the light and dark versions of your assets are likely identical (except for the colors), if your index.html file is compressed with gzip, the size difference will be negligible.

How should I use it with React Navigation?

If you are using React Navigation, you can hide the splash screen once the navigation container and all children have finished mounting by using the onReady function.

import { NavigationContainer } from "@react-navigation/native";
import BootSplash from "react-native-bootsplash";

const App = () => (
  <NavigationContainer
    onReady={() => {
      BootSplash.hide();
    }}
  >
    {/* content */}
  </NavigationContainer>
);

How can I mock the module in my tests?

Testing code which uses this library requires some setup since we need to mock the native methods.

To add the mocks, create a file jest/setup.js (or any other file name) containing the following code:

jest.mock("react-native-bootsplash", () => {
  return {
    hide: jest.fn().mockResolvedValue(),
    isVisible: jest.fn().mockResolvedValue(false),
    useHideAnimation: jest.fn().mockReturnValue({
      container: {},
      logo: { source: 0 },
      brand: { source: 0 },
    }),
  };
});

After that, we need to add the setup file in the jest config. You can add it under setupFiles option in your jest config file:

{
  "setupFiles": ["<rootDir>/jest/setup.js"]
}

Sponsors

This module is provided as is, I work on it in my free time.

If you or your company uses it in a production app, consider sponsoring this project 💰. You also can contact me for premium enterprise support: help with issues, prioritize bugfixes, feature requests, etc.

Sponsors list