nguyenbathanh / animated-bottom-navigation-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Example of animating tab transitions

It seems that a decent amount of people are interested in being able to animate transitions between tabs with the bottom tab navigator in React Navigation. The number of ways that people may want to animate this are endless, and none of the built in platform bottom tab navigation patterns provide this behavior out of the box, so we aren't interested in maintaining a generic animated tab changing solution. Thankfully this is easy enough to implement exactly as you need it by just building your own tab navigator on top of the existing tools that React Navigation gives you. See createAnimatedBottomTabNavigator.js, where half of the code is just copy/pasted out of this file, for an example of how you can animate between tabs. App.js uses the navigator created in that file. I only built a simple example that fades from the previously selected screen to the currently selected screen (and every screen in between is involved in this too) but you can do whatever you want using this same pattern.



Language:JavaScript 100.0%