- react-router-animation - NPM link
- Live Demo
react-router-animation is a lightweight, simple component for adding a sliding animation transition when swapping between react-router components. MUST be using react-router for this package to work.
In the root directory of your project:
npm install --save react-router-animation
OR
yarn add react-router-animation
Place the following import in the file where your routes are(for me App.js):
import SwitchWithSlide from "react-router-animation";
Wrap your routes in App.js or wherever you have them in the HOC provided by react-router-animation
<SwitchWithSlide>
<Route exact path="/" component={Home} />
<Route exact path="/page" component={Page} />
</SwitchWithSlide>
- React - JS framework
- classnames - Only dependency used to conditionally assign class names
All contribution welcome :) Open an issue, submit a pull request, or contact me directly!
This project is licensed under the ISC License - see the LICENSE.md file for details