Project Name | Stars | Downloads | Repos Using This | Packages Using This | Most Recent Commit | Total Releases | Latest Release | Open Issues | License | Language |
---|---|---|---|---|---|---|---|---|---|---|
Kmnavigationbartransition | 3,244 | 36 | 2 years ago | 21 | October 10, 2021 | 40 | mit | Objective-C | ||
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. | ||||||||||
Fluidtransitions | 2,778 | 40 | 2 | 2 years ago | 25 | April 30, 2019 | 75 | mit | JavaScript | |
Fluid Transitions for React Navigation | ||||||||||
Guillotinemenu Android | 2,716 | 5 years ago | 7 | Java | ||||||
Neat library, that provides a simple way to implement guillotine-styled animation | ||||||||||
React Awesome Slider | 2,601 | 42 | 13 | 6 months ago | 45 | February 21, 2020 | 76 | mit | JavaScript | |
React content transition slider. Awesome Slider is a 60fps, light weight, performant component that renders an animated set of production ready UI general purpose sliders with fullpage transition support for NextJS and GatsbyJS. 🖥️ 📱 | ||||||||||
Cicerone | 2,495 | 16 days ago | 3 | July 20, 2021 | 16 | other | Kotlin | |||
🚦 Cicerone is a lightweight library that makes the navigation in an Android app easy. | ||||||||||
Layerjs | 1,814 | 3 years ago | 25 | other | JavaScript | |||||
layerJS: Javascript UI composition framework | ||||||||||
Pushy | 1,483 | 5 | 4 months ago | 6 | December 29, 2020 | 10 | other | HTML | ||
Pushy is a responsive off-canvas navigation menu using CSS transforms & transitions. | ||||||||||
React Navigation Shared Element | 1,181 | 3 | 2 | 2 months ago | 17 | September 01, 2021 | 85 | mit | TypeScript | |
React Navigation bindings for react-native-shared-element 💫 | ||||||||||
Voyager | 1,110 | 11 days ago | 18 | April 30, 2022 | 39 | mit | Kotlin | |||
🛸 A pragmatic navigation library for Jetpack Compose | ||||||||||
Scoop | 1,049 | 2 | 1 | 4 years ago | 24 | November 18, 2016 | 14 | apache-2.0 | Java | |
:icecream: micro framework for building view based modular Android applications. |
This project aims to implement a simple yet powerful set of constructs for building fluid transitions between elements when navigating with React Navigation.
The library is JavaScript only - no linking required.
The library implements a new navigator component called FluidNavigator
with the same interface and routing configuration as the StackNavigator
. The library has a component called Transition
which can be used to build different types of transitions that will automatically be run when navigating between screens using the regular navigation actions.
The Navigator's API is identical to the StackNavigator except that it does not support a header component. It can easily be integrated with redux and your existing navigation setups.
Medium article
React Native Animation Challenge #1
To install the library into your project, run yarn or npm:
yarn add react-navigation-fluid-transitions
or
npm i -S react-navigation-fluid-transitions
Note on versions: [email protected] is compatible with [email protected], while [email protected] is compatible with [email protected]. Future improvements and development will be on [email protected].
Examples are included in the project and should be runnable from the root of the project folder.
To start the example run the following commands from the terminal:
npm i
or yarn
To start the project run
react-native run-ios
or react-native run-android
This example shows how two elements can be set up to automatically transition between each other when navigating between screens. A more detailed edition of this example can be found in the file SharedElements.js.
Note that a shared transition happens between two elements that looks the same. The library animates position and scale between the two hence using different styles and content between the two elements will result in strange transitions.
const Screen1 = (props) => (
<View style={styles.container}>
<Text>Screen 1</Text>
<View style={styles.screen1}>
<Transition shared='circle'>
<View style={styles.circle}/>
</Transition>
</View>
<Button
title='Next'
onPress={() => props.navigation.navigate('screen2')}
/>
</View>
);
const Screen2 = (props) => (
<View style={styles.container}>
<Text>Screen 2</Text>
<View style={styles.screen2}>
<Transition shared='circle'>
<View style={styles.circle2}/>
</Transition>
</View>
<Button
title='Back'
onPress={() => props.navigation.goBack()}
/>
</View>
);
const Navigator = FluidNavigator({
screen1: { screen: Screen1 },
screen2: { screen: Screen2 },
});
The library also supports transitions for elements wrapped in the Transition
component. You can provide appear/disappear transitions that will be animated during navigation.
The Transition
element supports appear and disappear transitions (appear will be used if disappear is not set), and these can either be one of the predefined transitions - or functions where you provide your own transitions.
<Transition appear='scale' disappear='bottom'>
<View style={styles.circle}/>
</Transition>
Name | Description |
---|---|
scale | Scales the element in and out |
top | Translates the element in/out from the top of the screen |
bottom | Translates the element in/out from the bottom of the screen |
left | Translates the element in/out from the left of the screen |
right | Translates the element in/out from the right of the screen |
horizontal | Translates the element in/out from the left/right of the screen |
vertical | Translates the element in/out from the top/bottom of the screen |
flip | Flips the element in/out |
It is easy to provide custom transitions - just add the transition function to your component's appear or disappear property. The following example creates a transition that will scale in from 88 times the original size of the wrapped component:
<Transition appear={myCustomTransitionFunction}>
<View style={styles.circle}/>
</Transition>
myCustomTransitionFunction = (transitionInfo) => {
const { progress, start, end } = transitionInfo;
const scaleInterpolation = progress.interpolate({
inputRange: [0, start, end, 1],
outputRange: [88, 80, 1, 1],
});
return { transform: [{ scale: scaleInterpolation }] };
}
Read more about the parameters and functionality for building custom transitions.
Some of the concepts in the library builds on ideas from @lintonye's pull request and suggestion found here: Shared element transition #941.
Christian Falch (@chrfalch), Yuuki Arisawa (@uk-ar), Joe Goodall (@joegoodall1), sonaye, David Chavez, muhaimincs, KingTayTay, pedrobullo, Nathan James, Filip Engberg, DadImScared, fabriziogiordano, kelset, rewieer, Dan Alloway, Alexander Zizzo, Monica He, Avi Patel, Julian Hundeloh, Luong Dang Hai, Peter Henderson
Fram X - a cross platform app company from Norway.