
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
rn-animation-kit
Advanced tools
A powerful and easy-to-use animation library for React Native using react-native-reanimated. Includes FadeIn, SlideIn, ScaleIn, RotateIn, BounceIn, FlipIn, ZoomIn and composition components.
A powerful and easy-to-use animation library for React Native using react-native-reanimated. Animate your components with simple wrapper components.
https://github.com/user-attachments/assets/b0881382-9f49-4afe-ba72-7e058c8853fa
See the animations in action!
npm install rn-animation-kit
# or
yarn add rn-animation-kit
This package requires react-native-reanimated (v3.0.0 or higher):
npm install react-native-reanimated
# or
yarn add react-native-reanimated
Follow the react-native-reanimated installation guide for additional setup.
import { FadeIn, SlideIn, ScaleIn } from 'rn-animation-kit';
import { View, Text } from 'react-native';
function App() {
return (
<View>
<FadeIn direction="top" delay={0}>
<Text>I fade in from the top!</Text>
</FadeIn>
<SlideIn direction="left" delay={100}>
<Text>I slide in from the left!</Text>
</SlideIn>
<ScaleIn delay={200}>
<Text>I scale up!</Text>
</ScaleIn>
</View>
);
}
Fades in with optional directional movement and scaling.
<FadeIn
direction="top" // 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
distance={75} // Distance to travel (default: 75)
scale={1.2} // Initial scale (default: 1, no scale)
delay={0} // Delay before animation starts (ms)
animate={true} // Enable/disable animation
onAnimationComplete={() => console.log('Done!')}
>
<YourComponent />
</FadeIn>
Examples:
// Fade in from top with slight scale
<FadeIn direction="top" scale={1.1}>
<Text>Welcome!</Text>
</FadeIn>
// Fade in from bottom-left corner
<FadeIn direction="bottom-left" distance={100}>
<Card />
</FadeIn>
Slides in from specified direction.
<SlideIn
direction="left" // 'top' | 'bottom' | 'left' | 'right' | 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right'
distance={300} // Custom distance (optional, defaults to screen width)
delay={0}
>
<YourComponent />
</SlideIn>
Examples:
// Slide in from right
<SlideIn direction="right">
<Menu />
</SlideIn>
// Slide in from top with custom distance
<SlideIn direction="top" distance={200}>
<Header />
</SlideIn>
Scales up from small to full size.
<ScaleIn
initialScale={0} // Starting scale (default: 0)
finalScale={1} // Ending scale (default: 1)
direction="bottom" // Optional directional movement
delay={0}
>
<YourComponent />
</ScaleIn>
Examples:
// Scale from 0 to 1
<ScaleIn>
<Avatar />
</ScaleIn>
// Scale with upward movement
<ScaleIn initialScale={0.5} direction="bottom">
<Button />
</ScaleIn>
Rotates while fading in.
<RotateIn
rotation={360} // Degrees to rotate (default: 360)
direction="clockwise" // 'clockwise' | 'counter-clockwise'
delay={0}
>
<YourComponent />
</RotateIn>
Examples:
// Full rotation clockwise
<RotateIn>
<Icon name="settings" />
</RotateIn>
// Half rotation counter-clockwise
<RotateIn rotation={180} direction="counter-clockwise">
<Logo />
</RotateIn>
Bounces in with elastic effect.
<BounceIn
direction="bottom" // 'top' | 'bottom' | 'left' | 'right'
bounceHeight={100} // Height of bounce (default: 100)
delay={0}
>
<YourComponent />
</BounceIn>
Examples:
// Bounce from bottom
<BounceIn direction="bottom">
<Notification />
</BounceIn>
// High bounce from top
<BounceIn direction="top" bounceHeight={150}>
<Alert />
</BounceIn>
Flips in on X or Y axis.
<FlipIn
axis="y" // 'x' | 'y'
direction="forward" // 'forward' | 'backward'
delay={0}
>
<YourComponent />
</FlipIn>
Examples:
// Flip on Y axis (horizontal flip)
<FlipIn axis="y">
<Card />
</FlipIn>
// Flip on X axis (vertical flip)
<FlipIn axis="x" direction="backward">
<Panel />
</FlipIn>
Zooms in with optional overshoot effect.
<ZoomIn
initialScale={0} // Starting scale (default: 0)
overshoot={1.1} // Overshoot scale (default: 1.1)
delay={0}
>
<YourComponent />
</ZoomIn>
Examples:
// Zoom with slight overshoot
<ZoomIn>
<Modal />
</ZoomIn>
// Zoom from 0.5 with large overshoot
<ZoomIn initialScale={0.5} overshoot={1.2}>
<Popup />
</ZoomIn>
Animates children one after another with staggered timing.
<Sequence stagger={100} delay={0}>
<FadeIn direction="top">
<Text>First</Text>
</FadeIn>
<FadeIn direction="top">
<Text>Second (100ms later)</Text>
</FadeIn>
<FadeIn direction="top">
<Text>Third (200ms later)</Text>
</FadeIn>
</Sequence>
Example - List Items:
<Sequence stagger={75}>
{items.map((item, index) => (
<FadeIn key={index} direction="left">
<ListItem data={item} />
</FadeIn>
))}
</Sequence>
Animates all children simultaneously.
<Parallel delay={200}>
<FadeIn direction="top">
<Header />
</FadeIn>
<SlideIn direction="left">
<Sidebar />
</SlideIn>
<ScaleIn>
<Content />
</ScaleIn>
</Parallel>
function CardList({ cards }) {
return (
<Sequence stagger={100}>
{cards.map((card, index) => (
<FadeIn key={card.id} direction="top" distance={50}>
<Card data={card} />
</FadeIn>
))}
</Sequence>
);
}
function AnimatedModal({ visible }) {
return (
<ZoomIn animate={visible} initialScale={0.8}>
<View style={styles.modal}>
<Sequence stagger={50}>
<FadeIn direction="top">
<ModalHeader />
</FadeIn>
<FadeIn direction="left">
<ModalContent />
</FadeIn>
<FadeIn direction="bottom">
<ModalActions />
</FadeIn>
</Sequence>
</View>
</ZoomIn>
);
}
function HeroSection() {
return (
<View>
<FadeIn direction="top" distance={100}>
<Logo />
</FadeIn>
<Sequence stagger={150} delay={200}>
<FadeIn direction="left">
<Title>Welcome to Our App</Title>
</FadeIn>
<FadeIn direction="right">
<Subtitle>Build amazing things</Subtitle>
</FadeIn>
<ScaleIn>
<Button title="Get Started" />
</ScaleIn>
</Sequence>
</View>
);
}
function TabContent({ activeTab }) {
return (
<>
{activeTab === 'home' && (
<SlideIn direction="right">
<HomeContent />
</SlideIn>
)}
{activeTab === 'profile' && (
<SlideIn direction="left">
<ProfileContent />
</SlideIn>
)}
</>
);
}
function Toast({ visible, message }) {
return (
<BounceIn
animate={visible}
direction="top"
bounceHeight={80}
onAnimationComplete={() => console.log('Toast shown')}
>
<View style={styles.toast}>
<Text>{message}</Text>
</View>
</BounceIn>
);
}
Pre-configured spring animations:
import { SPRING_CONFIGS } from 'rn-animation-kit';
// Available configs:
SPRING_CONFIGS.default // Balanced (damping: 14, stiffness: 75)
SPRING_CONFIGS.gentle // Smooth (damping: 20, stiffness: 90)
SPRING_CONFIGS.bouncy // Elastic (damping: 8, stiffness: 100)
SPRING_CONFIGS.stiff // Quick (damping: 26, stiffness: 180)
SPRING_CONFIGS.slow // Gradual (damping: 20, stiffness: 50)
You can customize the spring configuration in each component:
// Modify in the component files
const SPRING_CONFIG = {
damping: 15,
stiffness: 100,
mass: 1,
overshootClamping: false,
restDisplacementThreshold: 0.01,
restSpeedThreshold: 2,
};
All animation components support these common props:
| Prop | Type | Default | Description |
|---|---|---|---|
children | ReactNode | required | Component(s) to animate |
delay | number | 0 | Delay before animation starts (ms) |
animate | boolean | true | Enable/disable animation |
style | StyleProp<ViewStyle> | undefined | Additional styles |
onAnimationComplete | () => void | undefined | Callback when animation finishes |
animate={false} to disable animations during testing or for accessibilityanimate prop based on state for re-triggering animationsFull TypeScript support with exported types:
import type {
FadeInProps,
SlideInProps,
ScaleInProps,
AnimationDirection,
} from 'rn-animation-kit';
MIT
Contributions are welcome! Please feel free to submit a Pull Request.
FAQs
A powerful and easy-to-use animation library for React Native using react-native-reanimated. Includes FadeIn, SlideIn, ScaleIn, RotateIn, BounceIn, FlipIn, ZoomIn and composition components.
We found that rn-animation-kit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.