Skip to content

🌊 Animated Tab Bottom Bar for react-navigation

License

Notifications You must be signed in to change notification settings

J3j3m/rn-wave-bottom-bar

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

15 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

rn-wave-bottom-bar semantic-release Build Status Known Vulnerabilities CodeFactor

Sample

Custom animated bottom-tab-bar for react-native.

πŸ’Ύ Installation

yarn add rn-wave-bottom-bar

or

yarn install rn-wave-bottom-bar --save

πŸ“‹ Requirements

βš’οΈ Usage

const Tab = createBottomTabNavigator();

const tabBarIcon = (name: string) => ({
  focused,
  color,
  size,
}: {
  focused: boolean;
  color: string; // Defines fab icon color
  size: number;
}) => <Icon name={name} size={28} color={focused ? 'white' : 'white'} />;

<NavigationContainer>
  <Tab.Navigator
    tabBarOptions={{
      activeTintColor: 'purple', // Used for the FAB background Color
    }}
    tabBar={(props) => <BottomFabBar color="purple" {...props} />}
  >
    <Tab.Screen
      options={{ tabBarIcon: tabBarIcon('aliwangwang-o1') }}
      name="Home"
      component={generateScreen('Home')}
    />
    <Tab.Screen
      name="Account"
      options={{ tabBarIcon: tabBarIcon('meh') }}
      component={generateScreen('Meh')}
    />
  </Tab.Navigator>
</NavigationContainer>;

πŸ”§ Props

Prop Type Description
color string Bottom Bar background color
springConfig Animated.SpringConfig Spring config for the animation
tabBarProps BottomTabBarProps TabBar props passed from the Tab Component

πŸ“„ Credits

Thanks to W.Candillon for the tuto : https://www.youtube.com/watch?v=6LsLgHeX500

Initial Design : https://uimovement.com/design/tab-bar-3/

Compatibility

βœ… Works well with mosts Devices and tested on iPad, IPhones, Android Devices.

βœ… Support device orientation.

About

🌊 Animated Tab Bottom Bar for react-navigation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 57.8%
  • Objective-C 12.2%
  • JavaScript 10.5%
  • Java 9.1%
  • Ruby 8.6%
  • Starlark 1.8%