
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
react-native-css-animations
Advanced tools
Ready-to-use CSS Animation presets for React Native Reanimated
[!TIP] Since version 4.0, React Native Reanimated comes with a native support for CSS Animations and Transitions. Read the full announcement to learn more.
yarn add react-native-reanimated@next yarn add react-native-css-animations
Add spin
style object to an Animated
component add a linear spinning animation. Great for loaders.
import { spin } from 'react-native-css-animations';
import Animated from 'react-native-reanimated';
function App() {
return <Animated.View style={[styles.spinner, spin]} />;
}
Add ping
style object to an Animated
component to make the element scale and fade. Great for attention grabbing elements like notifications.
import { ping } from 'react-native-css-animations';
import Animated from 'react-native-reanimated';
function App() {
return <Animated.View style={[styles.notification, ping]} />;
}
Add pulse
style object to an Animated
component to make it fade in and out. Great for skeleton loaders.
import { pulse } from 'react-native-css-animations';
import Animated from 'react-native-reanimated';
function App() {
return <Animated.View style={[styles.skeleton, pulse]} />;
}
Add bounce
style object to an Animated
component to make it bounce up and down. Great for scroll down indicators.
import { bounce } from 'react-native-css-animations';
import Animated from 'react-native-reanimated';
function App() {
return <Animated.View style={[styles.arrow, bounce]} />;
}
Add shimmer
style object to an Animated
component to make it animate from left to right indefinitely. Great for shimmer loading effect.
[!NOTE] The example video on the right uses
@react-native-masked-view/masked-view
andexpo-linear-gradient
, and thus doesn't work on the Web.
import { shimmer } from 'react-native-css-animations';
import Animated from 'react-native-reanimated';
function App() {
return <Animated.View style={[styles.gradient, shimmer]} />;
}
The following animations are also available in a form of React Native components.
import {
Spin,
Ping,
Pulse,
Bounce,
Shimmer,
} from 'react-native-css-animations';
function App() {
return (
<Bounce>
<ArrowIcon />
</Bounce>
);
}
You can customize the animation style objects by overriding the styles like so:
import { shimmer } from 'react-native-css-animations';
import Animated from 'react-native-reanimated';
function App() {
return <Animated.View
style={[
styles.gradient,
shimmer,
+ {
+ animationName: {
+ to: { transform: [{ translateX: '100%' }] },
+ },
+ },
]}
>
}
FAQs
React Native CSS Animation presets for Reanimated 4
We found that react-native-css-animations demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.