Package Exports
- @react-navigation/material-bottom-tabs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@react-navigation/material-bottom-tabs) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@react-navigation/material-bottom-tabs
React Navigation integration for bottom navigation component from react-native-paper
.
Installation
Open a Terminal in your project's folder and run,
yarn add @react-navigation/core @react-navigation/material-bottom-tabs
Setup react-native-paper
following the Getting Started guide.
Usage
import { createMaterialBottomTabNavigator } from '@react-navigation/material-bottom-tabs';
const MaterialBottomTabs = createMaterialBottomTabNavigator();
export default function App() {
return (
<MaterialBottomTabs.Navigator>
<MaterialBottomTabs.Screen
name="article"
component={Article}
options={{
tabBarLabel: 'Article',
tabBarIcon: 'chrome-reader-mode',
}}
/>
<MaterialBottomTabs.Screen
name="chat"
component={Chat}
options={{
tabBarLabel: 'Chat',
tabBarIcon: 'chat-bubble',
}}
/>
<MaterialBottomTabs.Screen
name="contacts"
component={Contacts}
options={{
tabBarLabel: 'Contacts',
tabBarIcon: 'contacts',
}}
/>
<MaterialBottomTabs.Screen
name="albums"
component={Albums}
options={{
tabBarLabel: 'Albums',
tabBarIcon: 'photo-album',
}}
/>
</MaterialBottomTabs.Navigator>
);
}