The splash screen stays up until your app is ready and then hides on its own. Its image, background color and size are set through the expo-splash-screen config plugin, and they can't change at runtime. Every change needs a new app binary, and neither Expo Go nor a development build shows the result faithfully.
Key terms
expo-splash-screen: the library that controls the native splash screen and ships a built-in config plugin for its image, background color and other properties.imageWidth: the width the plugin gives the splash image, 100 when you don't set it.resizeMode: how the splash image is scaled, one ofcontain,coverornative.
Options in the plugins array
The config plugin is the recommended way to set up the splash screen. The other methods are legacy and will be removed. App config has no native splash key of its own: the only splash key in its type is web.splash, for PWA splash screens. The native splash goes in the plugins array as a two-element entry, the plugin name followed by an options object.
The options you set most often, with the values the plugin falls back to:
imageis the path to the splash icon. Only PNG files are supported, and any other format makes the production build fail. A 1024x1024 PNG with a transparent background works well.imagehas no default value: by convention the file issplash-icon.pnginassets/images, and the default template's plugin entry already pointsimagethere.backgroundColoris a hex color and defaults to#ffffff.imageWidthdefaults to 100. The default template sets it to 76.resizeModedefaults tocontainon both platforms. iOS treatsnativeas unset, so it falls back tocontainthere.
If your app doesn't use Expo Prebuild to generate the native android and ios directories, splash changes in app config have no effect.
A dark splash screen
The dark option holds the splash screen shown while the device is in dark mode. It accepts only two keys, image and backgroundColor.
How platform objects combine with the top level
The options object can also hold an android object and an ios object, each typed as a partial config for that platform. The ios object adds keys that exist only there, such as tabletImage and tabletBackgroundColor.
For each platform, the plugin starts from the top-level options and spreads that platform's object over them, and it merges dark the same way. A platform object therefore replaces only the keys it sets. Every key it leaves out keeps the top-level value on that platform.
The plugin entry in the example below sets a light and a dark splash for a reading app, then gives iOS its own background colors. Each platform ends up with these values:
- Android uses everything from the top level:
splash-icon.pngon#FFF8EE, 90 wide, and the dark image on#14110Fin dark mode. - iOS takes
#FDF1DCfrom its own object but keepsimageWidth: 90and the top-levelimage, which theiosobject never mentions. - In dark mode, iOS combines the top-level
dark.imagewith its owndark.backgroundColorof#000000. - Neither platform sets
resizeMode, so both scale the image withcontain.
Checking it in a release build
Don't judge the splash screen in Expo Go or a development build. Expo Go shows your app icon while the splash screen is visible. Development builds include expo-dev-client, which has its own splash screen and may conflict with yours, and they don't reflect every property you set in the config plugin. Make a preview build or a production build and look at the splash screen there. Since the plugin's properties only take effect in a new binary, each change you want to see means another build.
Code Examples
{
"expo": {
"plugins": [
[
"expo-splash-screen",
{
"image": "./assets/images/splash-icon.png",
"backgroundColor": "#FFF8EE",
"imageWidth": 90,
"dark": {
"image": "./assets/images/splash-icon-dark.png",
"backgroundColor": "#14110F"
},
"ios": {
"backgroundColor": "#FDF1DC",
"dark": {
"backgroundColor": "#000000"
}
}
}
]
]
}
}