React Motions
React-Motions is a mix of ideas from Recompose and Animate.css. In fact, react-motions is a set of pure functions entirely based on animation purpose.
Usage
Using HOF
HOF - Based on Compositions
You can add compose animations (even custom animations) based on functions. Here is an example:
Using Components
React-Motions was created to be agnostic to the renderer:
React Renderer | Available for use | Version |
---|---|---|
React-DOM | ✔️ | ^16 |
React-Native | ✖️ | ✖️ |
React-TV | ✔️ | ^0.3 |
API
withInfinite
Set last animation with infinity
property.
withSequence
Execute next animation only after previous animation be finished.
compose
Execute all animations in the same time.
Bounce
Component
Render a React Component with Bounce animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Bounce animation (1s
duration)
FadeIn
Component
Render a React Component with FadeIn animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with FadeIn animation (1s
duration)
FadeOut
Component
Render a React Component with FadeOut animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with FadeOut animation (1s
duration)
Flash
Component
Render a React Component with Flash animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Flash animation (1s
duration)
Jello
Component
Render a React Component with Jello animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Jello animation (1s
duration)
Pulse
Component
Render a React Component with Pulse animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Pulse animation (1s
duration)
RubberBand
Component
Render a React Component with RubberBand animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with rubberBand animation (1s
duration)
Shake
Component
Render a React Component with Shake animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Shake animation (1s
duration)
Swing
Component
Render a React Component with Swing animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Swing animation (1s
duration)
Tada
Component
Render a React Component with Tada animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Tada animation (1s
duration)
Wobble
Component
Render a React Component with Wobble animation (2s
duration and iterationCount infinite
)
Function
Return a React Component with Wobble animation (1s
duration)
Roadmap
- [ ]
withSequence
- [ ]
compose
- [ ] Create handler props on Components for bind Animation Hooks
- [ ] Allows to configure animation property on HOC