Files
react-navigation/packages/material-bottom-tabs
Satyajit Sahoo 536225c2c3 chore: publish
- @react-navigation/bottom-tabs@5.0.0-alpha.35
 - @react-navigation/compat@5.0.0-alpha.24
 - @react-navigation/core@5.0.0-alpha.33
 - @react-navigation/drawer@5.0.0-alpha.37
 - @react-navigation/material-bottom-tabs@5.0.0-alpha.32
 - @react-navigation/material-top-tabs@5.0.0-alpha.31
 - @react-navigation/native-stack@5.0.0-alpha.25
 - @react-navigation/native@5.0.0-alpha.25
 - @react-navigation/routers@5.0.0-alpha.23
 - @react-navigation/stack@5.0.0-alpha.59
2020-01-13 14:37:49 +01:00
..
2019-12-14 22:25:25 +01:00
2020-01-13 14:37:49 +01:00
2020-01-13 14:37:49 +01:00

@react-navigation/material-bottom-tabs

React Navigation integration for bottom navigation component from react-native-paper.

Documentation can be found on the React Navigation website.

Installation

Open a Terminal in your project's folder and run,

yarn add @react-navigation/native @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: 'file-document-box',
        }}
      />
      <MaterialBottomTabs.Screen
        name="chat"
        component={Chat}
        options={{
          tabBarLabel: 'Chat',
          tabBarIcon: 'message-reply',
        }}
      />
      <MaterialBottomTabs.Screen
        name="contacts"
        component={Contacts}
        options={{
          tabBarLabel: 'Contacts',
          tabBarIcon: 'contacts',
        }}
      />
      <MaterialBottomTabs.Screen
        name="albums"
        component={Albums}
        options={{
          tabBarLabel: 'Albums',
          tabBarIcon: 'image-album',
        }}
      />
    </MaterialBottomTabs.Navigator>
  );
}