🚀 Splash Screen – React Native
A customizable Splash Screen built with React Native. This component provides a smooth entry animation and can be extended to navigate to any screen.
📸 Preview
📂 Folder Structure
project-root/ │ ├── assets/ │ └── logo.png │ ├── Splash.js └── package.json
✅ Prerequisites
Make sure you have these dependencies installed:
npm install react
npm install react-native
🔗 Usage
Update your Splash.js with below code:
import React, { useEffect } from 'react';
import { View, StyleSheet, Image } from 'react-native';
export default function Splash() {
useEffect(() => {
const timer = setTimeout(() => {
// move to other screen
}, 3000);
return () => clearTimeout(timer);
}, []);
return (
<View style={styles.container}>
<View style={styles.logoContainer}>
<Image resizeMode='cover' source={require('./assets/logo.png')} style={{ height: 250, width: 250 }} />
</View>
</View>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#000',
justifyContent: "center",
alignItems: "center",
},
logoContainer: {
alignItems: 'center',
},
});
📝 Notes
- Replace logo.png with your logo.
- Adjust duration and setTimeout for timing.