š Animated bottom bar for react-navigation, react-native.
npm install rn-wave-bottom-barCustom animated bottom-tab-bar for react-native.
Make sure you installed react-native-safe-area-context before installing the library
```
yarn add rn-wave-bottom-bar
or
``
npm install rn-wave-bottom-bar --save
- React-Navigation v6 installed : https://reactnavigation.org/
- React-native reanimated 2.+ installed : https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation
`jsx`
tabBarActiveTintColor: '#5F0B65',
tabBarActiveBackgroundColor: '#5F0B65',
tabBarInactiveBackgroundColor: 'red',
}}
tabBar={(props) => (
isRtl={false}
// Add Shadow for active tab bar button
focusedButtonStyle={{
shadowColor: '#000',
shadowOffset: {
width: 0,
height: 7,
},
shadowOpacity: 0.41,
shadowRadius: 9.11,
elevation: 14,
}}
// - You can add the style below to show screen content under the tab-bar
// - It will makes the "transparent tab bar" effect.
bottomBarContainerStyle={{
position: 'absolute',
bottom: 0,
left: 0,
right: 0,
}}
{...props}
/>
)}
>
tabBarIcon: tabBarIcon('aliwangwang-o1'),
}}
name="Home"
component={generateScreen('Home')}
/>
options={{ tabBarIcon: tabBarIcon('meh') }}
component={generateScreen('Meh')}
/>
tabBarIcon: tabBarIcon('rocket1'),
tabBarActiveBackgroundColor: '#45014A',
tabBarActiveTintColor: 'purple',
}}
name="Settings"
component={SettingsScreen}
/>
name="Trophy"
component={generateScreen('Trophy')}
/>
name="Wallet"
component={generateScreen('Wallet')}
/>
| Prop | Type | Description |
| :----------- | :---------------------: | :-----------------------------: |
| springConfig | Animated.SpringConfig | Spring config for the animation |
Install the version 1.0.3 :
``
yarn add rn-wave-bottom-bar@1.0.3
`typescript
const Tab = createBottomTabNavigator();
const tabBarIcon =
(name: string) =>
({
focused,
color,
size,
}: {
focused: boolean;
color: string; // Defines fab icon color
size: number;
}) =>
activeTintColor: 'purple', // Used for the FAB background Color
}}
tabBar={(props) =>
>
name="Home"
component={generateScreen('Home')}
/>
options={{ tabBarIcon: tabBarIcon('meh') }}
component={generateScreen('Meh')}
/>
`
TabBar:
``
tabBarOptions.activeTintColor -> screenOptions.tabBarActiveBackgroundColor
BottomFabBar :
```
color -> focusedButtonStyle
Thanks to W.Candillon for the tuto : https://www.youtube.com/watch?v=6LsLgHeX500
Initial Design : https://uimovement.com/design/tab-bar-3/
ā Works well with mosts Devices and tested on iPad, IPhones, Android Devices.
ā Support device orientation.
ā RTL support. (thanks darkhorse-coder)
š Checkout our other libraries :
- rn-gauge : https://github.com/Winzana/rn-gauge
- rn-exclude-system-gesture-area: https://github.com/Winzana/rn-exclude-system-gesture-area