Coder Social home page Coder Social logo

zhuopeng / react-router-transition Goto Github PK

View Code? Open in Web Editor NEW

This project forked from maisano/react-router-transition

0.0 2.0 0.0 161 KB

painless transitions built for react-router, powered by react-motion

Home Page: http://maisano.github.io/react-router-transition/

License: MIT License

HTML 0.94% JavaScript 92.63% CSS 6.42%

react-router-transition's Introduction

React Router Transition

Painless transitions for React Router, powered by React Motion. Example site.

  • v4-first
  • backward-compatible with previous versions of react-router

Installation

npm install --save react-router-transition

Example Usage

import { AnimatedSwitch } from 'react-router-transition';
import Route from 'react-router-dom/Route';

export default () => (
  <AnimatedSwitch
    atEnter={{ opacity: 0 }}
    atLeave={{ opacity: 0 }}
    atActive={{ opacity: 1 }}
    className="switch-wrapper"
  >
    <Route exact path="/" component={Home} />
    <Route path="/about/" component={About}/>
    <Route path="/etc/" component={Etc}/>
  </AnimatedSwitch>
)
.switch-wrapper {
  position: relative;
}

.switch-wrapper > div {
  position: absolute;
}

Docs

Limitations

This library has some obvious limitations, the most marked of which are:

  • no staggering or sequencing of animations
  • no durations or timing functions

react-router-transition's People

Contributors

damianobarbati avatar jacobangel avatar jonnyscholes avatar maisano avatar meriadec avatar mlecoq avatar vyorkin avatar zjlovezj 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.