Slide Transition Between Routes With react-slide-routes

An easy to use React component to slide between React routes. Works with React Router 4+.

How to use it:

1. Install & import the react-slide-routes.

# Yarn
$ yarn add react-slide-routes

# NPM
$ npm install react-slide-routes --save
import SlideRoutes from 'react-slide-routes';
import { Route, useLocation } from 'react-router-dom';

2. An example app showing how to slide routes in your React application.

const App = () => {
  const location = useLocation();
  return (
    <>
      <SlideRoutes location={location}>
        <Route path="/" render={Home} exact />
        <Route path="/category" render={Category} />
        <Route path="/about" render={About} />
      </SlideRoutes>
    </>
  );
};

Preview:

Slide Transition Between Routes With react-slide-routes

Download Details:

Author: nanxiaobei

Live Demo: View The Demo

Download Link: Download The Source Code

Official Website: https://github.com/nanxiaobei/react-slide-routes

License: MIT

You Might Be Interested In:

Tags:

Add Comment