Files
react-navigation/packages/tabs
Krzysztof Magiera 8ff96aa3cd Use react-native-screens when available (#54)
This change adds support for react-native-screens. Screens package makes it possible to use native primitives to render tabs container and its scenes such that they get properly mounted/unmounted when not visible.

The support has only been added to `createBottomTabNavigator` as the material one renders its own container that's a part of a different package (react-native-tab-view).
2018-09-18 12:07:59 +02:00
..
2018-03-17 18:37:54 +01:00
2018-03-17 18:37:54 +01:00
2018-03-17 18:37:54 +01:00
2018-05-24 14:46:23 +02:00
2018-03-17 18:37:54 +01:00
2018-03-17 18:37:54 +01:00
2018-03-17 18:37:54 +01:00
2018-03-17 18:37:54 +01:00
2018-03-17 18:37:54 +01:00
2018-03-17 18:37:54 +01:00

React Navigation Tabs

Build Status Version MIT License

Tab navigators for React Navigation.

Installation

With react-navigation@^2.0.0, no installation is required.

Usage

The package exports two different navigators:

  • createBottomTabNavigator: iOS like bottom tabs.
  • createMaterialTopTabNavigator: Material design themed top tabs with swipe gesture, from react-native-tab-view.

You can import individual navigators and use them:

import { createBottomTabNavigator } from 'react-navigation';

export default createBottomTabNavigator({
  Album: { screen: Album },
  Library: { screen: Library },
  History: { screen: History },
  Cart: { screen: Cart },
});

You can install another package, react-navigation-material-bottom-tabs, to use a third type of tab navigator:

  • createMaterialBottomTabNavigator: Material design themed animated bottom tabs, from react-native-paper.
import { createMaterialBottomTabNavigator } from 'react-navigation-material-bottom-tabs';

export default createMaterialBottomTabNavigator({
  Album: { screen: Album },
  Library: { screen: Library },
  History: { screen: History },
  Cart: { screen: Cart },
}, {
  initialRouteName: 'Album',
  activeTintColor: '#F44336',
});