Cinematic Splash
Deep purple gradient splash with scale/fade animations and a loading progress bar.
Live preview. Clicks work like taps.
Add it in 3 steps
Copy the code yourself and see every line.
- 1
Install what it needs
Expo picks versions that match your app.Terminal$ npx expo install expo-linear-gradient react-native lucide-react-native - 2
Copy the component
Make a new file, for examplecomponents/InstagramSplashScreen.tsx, and paste this in.components/InstagramSplashScreen.tsx1import React, { useEffect, useRef } from 'react'; 2import { View, Image, Animated, Dimensions, StyleSheet } from 'react-native'; 3import { LinearGradient } from 'expo-linear-gradient'; 4 5const { width } = Dimensions.get('window'); 6 7export default function CinematicInstagramSplash({ onAnimationComplete }) { 8 const fadeAnim = useRef(new Animated.Value(0)).current; 9 const scaleAnim = useRef(new Animated.Value(0.8)).current; 10 const loadingProgress = useRef(new Animated.Value(0)).current; 11 12 useEffect(() => { 13 // Run animations 14 Animated.parallel([ 15 Animated.timing(fadeAnim, { 16 toValue: 1, 17 duration: 800, 18 useNativeDriver: true, 19 }), 20 Animated.timing(scaleAnim, { 21 toValue: 1, 22 duration: 800, 23 useNativeDriver: true, 24 }), 25 Animated.timing(loadingProgress, { 26 toValue: 1, 27 duration: 2500, 28 useNativeDriver: false, 29 }), 30 ]).start(); 31 32 // Signal completion after 2.5 seconds 33 const timer = setTimeout(() => { 34 onAnimationComplete(); 35 }, 2500); 36 37 return () => clearTimeout(timer); 38 }, []); 39 40 return ( 41 <View style={styles.container}> 42 <LinearGradient 43 colors={['#2D1B69', '#1A0B3D', '#0A0E1A']} 44 style={StyleSheet.absoluteFill} 45 /> 46 47 <Animated.View 48 style={[ 49 styles.content, 50 { opacity: fadeAnim, transform: [{ scale: scaleAnim }] }, 51 ]}> 52 <Image 53 source={{ uri: 'https://www.uilora.com/logo.png' }} 54 style={styles.logo} 55 resizeMode="contain" 56 /> 57 </Animated.View> 58 59 <View style={styles.loadingContainer}> 60 <View style={styles.loadingBarBackground}> 61 <Animated.View 62 style={[ 63 styles.loadingBarFill, 64 { 65 width: loadingProgress.interpolate({ 66 inputRange: [0, 1], 67 outputRange: ['0%', '100%'], 68 }), 69 }, 70 ]}> 71 <LinearGradient 72 colors={['#8A2BE2', '#9D4EDD', '#B19CD9']} 73 start={{ x: 0, y: 0 }} 74 end={{ x: 1, y: 0 }} 75 style={styles.gradientFill} 76 /> 77 </Animated.View> 78 </View> 79 </View> 80 </View> 81 ); 82} 83 84const styles = StyleSheet.create({ 85 container: { flex: 1, justifyContent: 'center', alignItems: 'center' }, 86 content: { alignItems: 'center', justifyContent: 'center', flex: 1 }, 87 logo: { width: 200, height: 200 }, 88 loadingContainer: { position: 'absolute', bottom: 100, width: width * 0.7 }, 89 loadingBarBackground: { 90 height: 6, 91 backgroundColor: 'rgba(255, 255, 255, 0.1)', 92 borderRadius: 3, 93 overflow: 'hidden', 94 }, 95 loadingBarFill: { height: '100%', borderRadius: 3 }, 96 gradientFill: { flex: 1 }, 97}); 98 - 3
Use it
Import it on any page. Change the options to make it your own.page.tsx1import React, { useState } from 'react'; 2import { View, StyleSheet, TouchableOpacity, Text } from 'react-native'; 3import { Play } from 'lucide-react-native'; 4import CinematicInstagramSplash from './components/InstagramSplashScreen'; 5 6export default function App() { 7 const [isAnimating, setIsAnimating] = useState(true); 8 9 return ( 10 <View style={styles.container}> 11 {isAnimating ? ( 12 <CinematicInstagramSplash 13 onAnimationComplete={() => setIsAnimating(false)} 14 /> 15 ) : ( 16 <View style={styles.main}> 17 <TouchableOpacity 18 style={styles.btn} 19 onPress={() => setIsAnimating(true)} 20 > 21 <Play color="#fff" size={20} fill="#fff" /> 22 <Text style={styles.btnText}>REPLAY SPLASH</Text> 23 </TouchableOpacity> 24 </View> 25 )} 26 </View> 27 ); 28} 29 30const styles = StyleSheet.create({ 31 container: { flex: 1, backgroundColor: '#000' }, 32 main: { flex: 1, justifyContent: 'center', alignItems: 'center' }, 33 btn: { 34 flexDirection: 'row', 35 alignItems: 'center', 36 paddingVertical: 15, 37 paddingHorizontal: 30, 38 borderRadius: 30, 39 backgroundColor: 'rgba(255,255,255,0.1)', 40 borderWidth: 1, 41 borderColor: 'rgba(255,255,255,0.2)', 42 }, 43 btnText: { 44 color: '#fff', 45 marginLeft: 12, 46 fontWeight: '800', 47 letterSpacing: 1 48 }, 49});
