Animated 3D Parallax with Reanimated ๐
Wednesday, May 24, 2023
demos
animated-3d-parallax
An ongoing collection of React Native animations crafted with Reanimated, Gesture Handler, and Skia.
TypeScript
3.2k
296
A stunning 3D card component that responds to touch with realistic perspective and parallax effects. The card and its content smoothly rotate in 3D space based on touch position, creating an engaging interactive experience.
What's This About?
This component creates an immersive 3D effect where touch input controls the card's rotation. The content follows with a slight delay, creating a parallax effect that adds depth to the interaction. The result is a polished, iOS-like 3D card that responds naturally to user input.
Technical Implementation
The component uses spring animations and gesture handling for smooth interactions. It implements custom 3D rotation calculations with perspective transforms and interpolated values to achieve realistic motion.
Usage
type Use3DRotationStyleParams = {
x: Animated.SharedValue<number>;
y: Animated.SharedValue<number>;
maxSize: number;
maxRotation: number;
};
// Example usage
<Animated3DParallax />;
Unlock the beauty of React Native animations
Learn Reanimated, Gesture Handler & Skia with Reanimate.dev
Feedback on Animated 3d Parallax
Ideas, bugs, or anything that felt off: I read every message. For anything else, write to hello@reactiive.io.
Send feedback