Git Product home page Git Product logo

react-magic's Introduction

react-magic

npm version react react react

A collection of magic animations for react components. Although React provides a way to implement arbitrary animations, it is not an easy task to do it, even for simple animations. That's where react-magic package comes in. It supports inline styles work with aphrodite. Most animations was implemented base on magic.

Demo online

A demo is available on the Github Pages webpage for react-magic Check out demo!

Installation

React-magic is distributed via npm:

npm install --save react-magic    

Usage

You can import each animation directly from the main package

import { swap } from 'react-magic'

or you can import a specific animation directly

import swap from 'react-magic/lib/magic/swap'

usage with Aphrodite

import React, { Component, PropTypes } from 'react';
import { StyleSheet, css } from 'aphrodite';

import { swap } from 'react-magic';

const styles = StyleSheet.create({
    magic: {
        animationName: swap,
        animationDuration: '1s'
    }
});

class App extends Component {
    render() {
        return (
            <div>
                <div className={css(styles.magic)}>
                    <h2>react-magic</h2>
                </div>
            </div>
        );
    }
}

export default App;   

Animations

.
├── magic
│   |── magic     
│   |── twisterInDown           
│   |── twisterInUp         
│   └── swap    
├── bling                         
│   |── puffIn             
│   |── puffOut            
│   |── vanishIn                           
│   └── vanishOut                     
├── staticEffects                         
│   |── openDownLeft             
│   |── openDownLeftReturn            
│   |── openDownRight       
│   |── openDownRightReturn    
│   |── openUpLeft    
│   |── openUpLeftReturn    
│   |── openUpRight                        
│   └── openUpRightReturn                
├── staticEffectsOut                         
│   |── openDownLeftOut             
│   |── openDownRightOut            
│   |── openUpLeftOut                           
│   └── openUpRightOut     
├── perspective                         
│   |── perspectiveDown             
│   |── perspectiveDownReturn            
│   |── perspectiveLeft       
│   |── perspectiveLeftReturn  
│   |── perspectiveRight    
│   |── perspectiveRightReturn    
│   |── perspectiveUp                        
│   └── perspectiveUpReturn              
├── rotate                         
│   |── rotateDownIn             
│   |── rotateDownOut            
│   |── rotateLeftIn       
│   |── rotateLeftOut  
│   |── rotateRightIn    
│   |── rotateRightOut    
│   |── rotateUpIn                        
│   └── rotateUpOut               
├── slide                         
│   |── slideDown             
│   |── slideDownReturn            
│   |── slideLeft       
│   |── slideLeftReturn  
│   |── slideRight    
│   |── slideRightReturn    
│   |── slideUp                        
│   └── slideUpReturn            
├── math                                
│   |── foolishIn       
│   |── foolishOut  
│   |── holeIn    
│   |── holeOut    
│   |── swashIn                        
│   └── swashOut     
├── tin                         
│   |── tinDownIn             
│   |── tinDownOut            
│   |── tinLeftIn       
│   |── tinLeftOut  
│   |── tinRightIn    
│   |── tinRightOut    
│   |── tinUpIn                        
│   └── tinUpOut     
├── bomb
│   |── bombLeftOut           
│   └── bombRightOut           
├── boing
│   |── boingInUp           
│   └── boingOutDown     
├── space                         
│   |── spaceInDown             
│   |── spaceInLeft            
│   |── spaceInRight       
│   |── spaceInUp  
│   |── spaceOutDown    
│   |── spaceOutLeft    
│   |── spaceOutRight                        
│   └── spaceOutUp         

License

MIT

react-magic's People

Contributors

duxiaodi avatar sylvenas avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.