
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
react-native-custom-splash
Advanced tools
A custom splash screen module for React Native with native iOS and Android support, fully compatible with Expo
A powerful and easy-to-use custom splash screen module for React Native with native iOS and Android support, fully compatible with Expo!
app.jsonnpm install react-native-custom-splash
# or
yarn add react-native-custom-splash
Create an assets folder in your project root and add your images:
your-project/
├── assets/
│ ├── splash-background.png (your full background image - optional)
│ └── logo.png (your center logo - optional)
├── app.json
└── ...
Choose one of the 4 configuration options below based on your needs:
Perfect for a complete branded splash screen with your custom design.
{
"expo": {
"name": "YourApp",
"plugins": [
[
"react-native-custom-splash",
{
"image": "./assets/splash.png"
}
]
]
}
}
Project Structure:
your-project/
├── assets/
│ └── splash.png ← Your full-screen image (1242×2688px)
└── app.json
Great for a clean, minimal look with just your logo.
{
"expo": {
"name": "YourApp",
"plugins": [
[
"react-native-custom-splash",
{
"backgroundColor": "#4F46E5",
"logo": "./assets/logo.png",
"logoWidth": 180
}
]
]
}
}
Project Structure:
your-project/
├── assets/
│ └── logo.png ← Your center logo (512×512px)
└── app.json
Maximum customization - background image with logo on top.
{
"expo": {
"name": "YourApp",
"plugins": [
[
"react-native-custom-splash",
{
"backgroundColor": "#FFFFFF",
"image": "./assets/splash-bg.png",
"logo": "./assets/logo.png",
"logoWidth": 150
}
]
]
}
}
Project Structure:
your-project/
├── assets/
│ ├── splash-bg.png ← Background image
│ └── logo.png ← Center logo
└── app.json
Simple solid color background.
{
"expo": {
"name": "YourApp",
"plugins": [
[
"react-native-custom-splash",
{
"backgroundColor": "#FF6B6B"
}
]
]
}
}
npx expo prebuild --clean
That's it! 🎉 The plugin will automatically:
import SplashScreen from 'react-native-custom-splash';
import React, { useEffect } from 'react';
function App() {
useEffect(() => {
// Hide splash screen after app loads
setTimeout(() => {
SplashScreen.hide(true); // true = animated
}, 2000);
}, []);
return (
// Your app content
);
}
| Option | Type | Default | Description |
|---|---|---|---|
backgroundColor | string | #FFFFFF | Background color (hex format: #RRGGBB) |
image | string | null | Path to full background image (optional) |
logo | string | null | Path to center logo image (optional) |
logoWidth | number | 150 | Width of the center logo in pixels |
SplashScreen.hide(animated)Hides the splash screen.
Parameters:
animated (boolean): Whether to animate the hide transition. Default: trueReturns: Promise
Example:
// With animation (recommended)
await SplashScreen.hide(true);
// Without animation
await SplashScreen.hide(false);
SplashScreen.show()Shows the splash screen (usually not needed as it shows automatically on app launch).
Example:
SplashScreen.show();
logoWidthFull TypeScript support is included:
import SplashScreen, { SplashScreenInterface } from 'react-native-custom-splash';
const hideSplash = async (): Promise<void> => {
await SplashScreen.hide(true);
};
import { NavigationContainer } from '@react-navigation/native';
import SplashScreen from 'react-native-custom-splash';
function App() {
const [isReady, setIsReady] = React.useState(false);
React.useEffect(() => {
async function prepare() {
try {
// Load your resources here
await loadFonts();
await loadData();
} catch (e) {
console.warn(e);
} finally {
setIsReady(true);
}
}
prepare();
}, []);
React.useEffect(() => {
if (isReady) {
SplashScreen.hide(true);
}
}, [isReady]);
if (!isReady) {
return null;
}
return (
<NavigationContainer>
{/* Your navigation */}
</NavigationContainer>
);
}
If you were using the old manual method, you can now simplify:
Before (Manual Method):
ios/ folderandroid/app/src/main/res/drawable/colors.xmlAfter (Automatic Method):
assets/ folderapp.jsonnpx expo prebuild --cleanIf you're not using Expo, you can still use this package with manual setup:
Add your splash image to your Xcode project:
splash_image for background and/or splash_logo for center logo to your Assets catalogAdd your images to Android resources:
splash_image.png (background) and/or splash_logo.png (center logo) to android/app/src/main/res/drawable/android/app/src/main/res/values/colors.xml:<color name="splash_background">#FFFFFF</color>
Full Error:
PluginError: Plugin is an unexpected object, with keys: "backgroundColor, image, logoWidth".
Cause: Your plugin configuration is not properly wrapped in square brackets.
❌ Wrong:
{
"plugins": [
"react-native-custom-splash",
{
"backgroundColor": "#FF6B6B"
}
]
}
✅ Correct:
{
"plugins": [
[
"react-native-custom-splash",
{
"backgroundColor": "#FF6B6B"
}
]
]
}
Key Point: When passing configuration to a plugin, wrap BOTH the plugin name and the config object in square brackets [].
npx expo prebuild --clean after changing configurationapp.json are correct and files existassets/ foldercd ios && pod install && cd ..cd android && ./gradlew clean && cd ..npx expo prebuild --clean to force regeneration of native projectsios/ and android/ folders, then run npx expo prebuild --clean againrm -rf ios/Pods ios/buildcd android && ./gradlew clean && cd .."./assets/splash.png" ✅"/Users/..." ❌.png, .jpg)"#FF6B6B" ✅#: "FF6B6B" ❌"#FFFFFF" ✅ not "#FFF" ❌@types/react and @types/react-native installednpm install --save-dev @types/react @types/react-nativecd ios
rm -rf Pods Podfile.lock
pod install --repo-update
cd ..
node_modules/ and reinstall: npm install or yarn installios/ and android/ foldersnpx expo prebuild --cleanMIT
Contributions are welcome! Please feel free to submit a Pull Request.
If you find this package helpful, please give it a ⭐️ on GitHub!
Made with ❤️ for the React Native community
FAQs
A custom splash screen module for React Native with native iOS and Android support, fully compatible with Expo
The npm package react-native-custom-splash receives a total of 9 weekly downloads. As such, react-native-custom-splash popularity was classified as not popular.
We found that react-native-custom-splash demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.