
Research
/Security News
Toptal’s GitHub Organization Hijacked: 10 Malicious Packages Published
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
react-animations
Advanced tools
A collection of animations that can be used with any inline style library that supports using objects to define keyframe animations, such as Radium or Aphrodite. React-animations implements all animations from animate.css.
Check out the interactive demo.
You can import each animation directly from the main package
import { fadeIn } from 'react-animations'
or you can import a specific animation directly
import fadeIn from 'react-animations/lib/fade-in'
import React from 'react';
import { bounce } from 'react-animations';
import Radium, {StyleRoot} from 'radium';
const styles = {
bounce: {
animation: 'x 1s',
animationName: Radium.keyframes(bounce, 'bounce')
}
}
class Test extends React.Component {
render() {
<StyleRoot>
<div className="test" style={styles.bounce}>
</div>
</StyleRoot>
}
}
import { bounce } from 'react-animations';
import { StyleSheet, css } from 'aphrodite';
const styles = StyleSheet.create({
bounce: {
animationName: bounce,
animationDuration: '1s'
}
})
import { bounce } from 'react-animations';
import jss from 'jss'
import preset from 'jss-preset-default'
jss.setup(preset())
const {classes} = jss.createStyleSheet({
'@keyframes bounce': bounce,
bounce: {
animationName: 'bounce',
animationDuration: '1s',
},
}).attach()
styled-components
import styled, { keyframes } from 'styled-components';
import { bounce } from 'react-animations';
const bounceAnimation = keyframes`${bounce}`;
const BouncyDiv = styled.div`
animation: 1s ${bounceAnimation};
`;
Below is a list of all available animations
bouceOut
bounce
bounceIn
bounceInDown
bounceInLeft
bounceInRight
bounceInUp
bounceOutDown
bounceOutLeft
bounceOutRight
bounceOutUp
fadeIn
fadeInDown
fadeInDownBig
fadeInLeft
fadeInLeftBig
fadeInRight
fadeInRightBig
fadeInUp
fadeInUpBig
fadeOut
fadeOutDown
fadeOutDownBig
fadeOutLeft
fadeOutLeftBig
fadeOutRight
fadeOutRightBig
fadeOutUp
fadeOutUpBig
flash
flip
flipInX
flipInY
flipOutX
flipOutY
headShake
hinge
jello
lightSpeedIn
lightSpeedOut
pulse
rollIn
rollOut
rotateIn
rotateInDownLeft
rotateInDownRight
rotateInUpLeft
rotateInUpRight
rotateOut
rotateOutDownLeft
rotateOutDownRight
rotateOutUpLeft
rotateOutUpRight
rubberBand
shake
slideInDown
slideInLeft
slideInRight
slideInUp
slideOutDown
slideOutLeft
slideOutRight
slideOutUp
swing
tada
wobble
zoomIn
zoomInDown
zoomInLeft
zoomInRight
zoomInUp
zoomOut
zoomOutDown
zoomOutLeft
zoomOutRight
zoomOutUp
react-animations also exports a merge
function that takes two animations and returns a new animation that combines the transforms from both. This is experimental and wont work (well) with animations that have conflicting transforms, such as fadeIn
and fadeOut
. The merged animation can be used just like any of the imported animations.
import { merge, tada, flip } from 'react-animations';
const tadaFlip = merge(tada, flip);
FAQs
A collection of animations for inline styles
The npm package react-animations receives a total of 21,605 weekly downloads. As such, react-animations popularity was classified as popular.
We found that react-animations demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Research
/Security News
Threat actors hijacked Toptal’s GitHub org, publishing npm packages with malicious payloads that steal tokens and attempt to wipe victim systems.
Research
/Security News
Socket researchers investigate 4 malicious npm and PyPI packages with 56,000+ downloads that install surveillance malware.
Security News
The ongoing npm phishing campaign escalates as attackers hijack the popular 'is' package, embedding malware in multiple versions.