Slide-up animation — element slides up into view.
Implementation:
1import { Animated } from "react-native";23function SlideUpView({ children }) {4 const slideAnim = useRef(new Animated.Value(100)).current;56 useEffect(() => {7 Animated.spring(slideAnim, {8 toValue: 0,9 friction: 8,10 tension: 40,11 useNativeDriver: true,12 }).start();13 }, []);1415 return (16 <Animated.View style={{17 transform: [{ translateY: slideAnim }],18 opacity: slideAnim.interpolate({19 inputRange: [0, 100],20 outputRange: [1, 0],21 }),22 }}>23 {children}24 </Animated.View>25 );26}