All Projects → berzniz → React Overdrive

berzniz / React Overdrive

Licence: mit
Super easy magic-move transitions for React apps

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to React Overdrive

Highway
Highway - A Modern Javascript Transitions Manager
Stars: ✭ 1,185 (-60.51%)
Mutual labels:  router, animations, transitions
highway
Highway - A Modern Javascript Transitions Manager
Stars: ✭ 1,349 (-55.05%)
Mutual labels:  router, animations, transitions
Xamarin Forms Page Transitions
Custom page transitions in a Xamarin.Forms App
Stars: ✭ 200 (-93.34%)
Mutual labels:  animations, transitions
Transition.css
Drop-in CSS transitions
Stars: ✭ 199 (-93.37%)
Mutual labels:  animations, transitions
React Router Native Stack
A stack navigation component for react-router-native
Stars: ✭ 171 (-94.3%)
Mutual labels:  router, transitions
Redux Time
∞ High-performance declarative JS animation library for building games, data-viz experiences, and more w/ React, ThreeJS, Inferno, SnabbDOM and others...
Stars: ✭ 99 (-96.7%)
Mutual labels:  animations, transitions
Ui Motion
How to apply meaningful and delightful motion in a sample Android app
Stars: ✭ 165 (-94.5%)
Mutual labels:  animations, transitions
Core
UI-Router Core: Framework agnostic, State-based routing for JavaScript Single Page Apps
Stars: ✭ 112 (-96.27%)
Mutual labels:  router, transitions
Animate Css Grid
Painless transitions for CSS Grid
Stars: ✭ 987 (-67.11%)
Mutual labels:  animations, transitions
aholachek.github.io
My website
Stars: ✭ 53 (-98.23%)
Mutual labels:  animations, transitions
Material-Design-Android
My stash for all things material, animations, typography, iconography, transitions, Animated VD, Color Palette API, UI design, and more.
Stars: ✭ 38 (-98.73%)
Mutual labels:  animations, transitions
animated
🌊 Implicit animations for JavaFX.
Stars: ✭ 79 (-97.37%)
Mutual labels:  animations, transitions
Sunset.css
This library offers a collection of different CSS-powered transitions.
Stars: ✭ 99 (-96.7%)
Mutual labels:  animations, transitions
React Native Fluid
Declarative animations for React Native and React Native Web.
Stars: ✭ 92 (-96.93%)
Mutual labels:  animations, transitions
Animatable Component
Animate once, use Everywhere! 💫
Stars: ✭ 188 (-93.74%)
Mutual labels:  animations, transitions
Rnal
Animations library for react-native
Stars: ✭ 54 (-98.2%)
Mutual labels:  animations, transitions
Swiftui Animation Library
SwiftUI Animation Library. Useful SwiftUI animations including Loading/progress, Looping, On-off, Enter, Exit, Fade, Spin and Background animations that you can directly implement in your next iOS application or project. The library also contains huge examples of spring animations such as Inertial Bounce, Shake, Twirl, Jelly, Jiggle, Rubber Band, Kitchen Sink and Wobble effects. Browse, find and download the animation that fits your needs.
Stars: ✭ 898 (-70.08%)
Mutual labels:  animations, transitions
Easytransform
Enhancing CSS transform with a little bit of JavaScript.
Stars: ✭ 10 (-99.67%)
Mutual labels:  animations, transitions
CustomSegueDemo
Demonstrates encapsulation of a custom view controller transition into a UIStoryboardSegue subclass
Stars: ✭ 31 (-98.97%)
Mutual labels:  animations, transitions
transitionable-routes
Perform transitions when changing routes with React Router
Stars: ✭ 26 (-99.13%)
Mutual labels:  animations, transitions

react-overdrive

Super easy magic-move transitions for React apps.

Demos

  1. Page transitions

Overdrive Demo

  1. Image Gallery with next.js

Overdrive Demo

  1. With React Router

Overdrive Demo

Install

$ npm install react-overdrive --save

Usage

Example with routing

Wrap any element (not just images) in a <Overdrive id=""></Overdrive> component. Add the same id to create a transition between the elements.

On page1.js:

import Overdrive from 'react-overdrive'

const pageA = (props) => (
  <div>
    <h1>Page A</h1>
    <Overdrive id="bender-to-big-fry">
      <img src="bender.png" width="100" height="100"/>
    </Overdrive>
  </div>
);

On page2.js:

import Overdrive from 'react-overdrive'

const pageB = (props) => (
  <div>
    <h1>Page B</h1>
    <Overdrive id="bender-to-big-fry">
      <img src="fry.png" width="300" height="300"/>
    </Overdrive>
  </div>
);

Now route between the pages.

Example without routing

On page.js:

import Overdrive from 'react-overdrive'

const page = (props) => (
  <div>
    {props.loading && <Overdrive id="content"><Loader/></Overdrive>}
    {!props.loading && <Overdrive id="content"><Content/></Overdrive>}
  </div>
);

API

Prop Description Default Value
id Required. A unique string to identify the component.
element Wrapping element type. 'div'
duration Animation duration (in milliseconds). 200
easing Animation easing function. ''
animationDelay Add delay of calculating the mounted component position. Setting to 1 usually helps avoiding issues with window scrolling. null
onAnimationEnd Event dispatched when the animation has finished. null

How does it work?

A transition is made when an <Overdrive id="example"/> component is unmounted and another <Overdrive id="example"/> is mounted not later than 100ms.

The transition is made by cloning the unmounted and mounted components, adding them with absolute position and CSS transformed from the source to the target position.

Sponsors

Thanks to the following companies for generously providing their services/products to help improve this project:

Thanks to BrowserStack for providing cross-browser testing.

Who made this?

Tal Bereznitskey. Find me on Twitter as @ketacode.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].