JSPM

  • Created
  • Published
  • Downloads 28804
  • Score
    100M100P100Q143816F
  • License MIT

Bringing anime.js to the React Community!

Package Exports

  • react-anime

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (react-anime) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Cover

react-anime

Npm Package Travis CI Release License Codecov Dependency Status devDependency Status

react-anime was written in an effort to make animations easier to work with. We made this possible by wrapping the awesome flexible yet lightweight JavaScript animation library, anime in a react component. Simply pass some props and your awesome animations come to life.

Inspiration for this library came because react-motion could get really complex really really fast when animating several things and trying to coordinate with the animations. Also it wasn't nice to see large portions of some component code filled with callbacks. React-Motion nonetheless is an awesome animation library!

Install

npm i react-anime -S

Usage

import React from 'react';
import Anime from 'react-anime';

let root = (props, state) => (
  <Anime easing="easeOutElastic"
         loop={true}
         duration={1000}
         direction="alternate"
         loop={true}
         delay={(el, index) => index * 240}
         translateX='13rem'
         scale={[.75, .9]}>
    <div className="blue"/>
    <div className="green"/>
    <div className="red"/>
  </Anime>
);

Contributing

To contribute make sure you have node v6.0.0+ and npm v3.8.0+

Project Scripts

# Create Development build of library
npm run build:develop

# Create Production build of library
npm run build:production

# Create both Production & Development build before finalizing pull request
npm run build:publish

# Run Tests
npm run test

# Watch Tests
npm run test:watch

# Run Tests and pass coverage to codecov
npm run coverage