@react-navigation/bottom-tabs#BottomTabBar TypeScript Examples
The following examples show how to use
@react-navigation/bottom-tabs#BottomTabBar.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TabNavigator.tsx From nyxo-app with GNU General Public License v3.0 | 5 votes |
TabBar: FC<BottomTabBarProps<BottomTabBarOptions>> = (props) => (
<BlurViewTabBar blurAmount={100}>
<BottomTabBar {...props} />
</BlurViewTabBar>
)
Example #2
Source File: themed-bottom-tab-bar.tsx From beancount-mobile with MIT License | 5 votes |
export function ThemedBottomTabBar(
props: BottomTabBarProps<BottomTabBarOptions>
): JSX.Element {
const theme = useTheme().colorTheme;
return (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
<BottomTabBar
{...props}
activeTintColor={theme.activeTintColor}
inactiveTintColor={theme.inactiveTintColor}
style={{
backgroundColor: theme.activeBackgroundColor,
}}
/>
);
}
Example #3
Source File: TabBar.tsx From clipped-tabbar with BSD 3-Clause "New" or "Revised" License | 4 votes |
TabBar: React.FC<Props> = ({ barColor }) => (
<NavigationContainer>
<BottomBar.Navigator
tabBar={(props) => (
<View style={styles.navigatorContainer}>
<BottomTabBar
{...props}
/>
{IS_IPHONE_X && (
<View style={[styles.xFillLine, {
backgroundColor: barColor
}]}/>
)}
</View>
)}
tabBarOptions={{
showIcon: true,
style: styles.navigator,
tabStyle: {
backgroundColor: barColor
}
}}
>
<BottomBar.Screen
name="Home"
component={EmptyScreen}
options={{
tabBarIcon: ({ color }) => (
<Icon
name="home"
size={24}
color={color}
/>
)
}}
/>
<BottomBar.Screen
name="Profile"
component={EmptyScreen}
options={{
tabBarIcon: ({ color }) => (
<Icon
name="user"
size={24}
color={color}
/>
)
}}
/>
<BottomBar.Screen
name="Rocket"
component={EmptyScreen}
options={{
tabBarButton: (props) => (
<TabBarAdvancedButton
bgColor={barColor}
{...props}
/>
)
}}
/>
<BottomBar.Screen
name="Messages"
component={EmptyScreen}
options={{
tabBarIcon: ({ color }) => (
<Icon
name="wechat"
size={24}
color={color}
/>
)
}}
/>
<BottomBar.Screen
name="Settings"
component={EmptyScreen}
options={{
tabBarIcon: ({ color }) => (
<Icon
name="gear"
size={24}
color={color}
/>
)
}}
/>
</BottomBar.Navigator>
</NavigationContainer>
)