Universal animation system for React Native with react-native-reanimated. Provides declarative animations, gesture handling, and preset configurations.
npm install @umituz/react-native-animationreact>= 18.2.0react-native>= 0.74.0react-native-reanimated>= 3.10.0react-native-gesture-handler>= 2.16.0
- ✅ Declarative animations (fade, slide, scale, bounce, shake)
- ✅ Spring physics animations
- ✅ Gesture handling (tap, pan, pinch, long press)
- ✅ Preset animation configs
- ✅ TypeScript type safety
- ✅ Zero backend dependencies
import { useAnimation } from '@umituz/react-native-animation';
import Animated from 'react-native-reanimated';
const MyComponent = () => {
const { fadeIn, animatedStyle } = useAnimation();
useEffect(() => {
fadeIn();
}, []);
return <Animated.View style={animatedStyle}>Content</Animated.View>;
};import { useGesture } from '@umituz/react-native-animation';
const MyComponent = () => {
const { createPanGesture, animatedStyle, GestureDetector } = useGesture();
const panGesture = createPanGesture({
onEnd: (x, y) => console.log('Dragged to:', x, y),
});
return (
<GestureDetector gesture={panGesture}>
<Animated.View style={animatedStyle}>Draggable</Animated.View>
</GestureDetector>
);
};fadeIn()/fadeOut()- Opacity animationsslideInUp()/slideInDown()/slideInLeft()/slideInRight()- Slide animationsscaleIn()/scaleOut()- Scale animationsbounce()- Bounce animationshake()- Shake animationpulse()- Pulse animationspin()- Spin animation
createTapGesture()- Tap gesturecreatePanGesture()- Pan/drag gesturecreatePinchGesture()- Pinch/zoom gesturecreateLongPressGesture()- Long press gesture
import { useReanimatedReady } from '@umituz/react-native-animation';
const MyComponent = () => {
const isReady = useReanimatedReady();
if (!isReady) {
return null; // Don't render Reanimated components until ready
}
return <Animated.View>...</Animated.View>;
};useAnimation(): Hook for declarative animationsuseGesture(): Hook for gesture handlinguseReanimatedReady(): Hook to check if Reanimated is fully initialized
AnimationPreset: Animation preset enumGestureType: Gesture type enumAnimationTimingConfig: Timing configurationAnimationSpringConfig: Spring configuration
MIT