Files
react-navigation/packages/tabs
imgbot[bot] ca2c23bfcc chore: optimize images (#234)
*Total -- 134.56kb -> 119.02kb (11.54%)

/example/assets/avatar-2.png -- 6.79kb -> 1.65kb (75.67%)
/example/assets/avatar-1.png -- 8.21kb -> 2.38kb (71.01%)
/example/assets/book.jpg -- 119.56kb -> 114.99kb (3.82%)

Signed-off-by: ImgBotApp <ImgBotHelp@gmail.com>

Co-authored-by: Imgbot <help@imgbot.net>
2020-01-03 11:36:37 +01:00
..
2018-03-17 18:37:54 +01:00
2019-10-03 15:18:24 +02:00
2018-03-17 18:37:54 +01:00
2020-01-03 11:36:37 +01:00
2018-10-31 16:25:46 -07:00
2018-03-17 18:37:54 +01:00
2019-03-02 02:51:10 +01:00
2018-03-17 18:37:54 +01:00
2019-12-03 18:34:58 +01:00
2019-11-20 15:49:22 +01:00

React Navigation Tabs

Build Status Version MIT License

Tab navigators for React Navigation.

Installation

Follow the instructions on the the React Navigation "Getting Started" guide, and then add the react-navigation-tabs package to your project.

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-tabs';

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',
  },
);

Development workflow

To setup the development environment, open a Terminal in the repo directory and run the following:

yarn bootstrap

While developing, you can run the example app with Expo to test your changes:

yarn example start

Make sure your code passes TypeScript and ESLint. Run the following to verify:

yarn typescript
yarn lint

To fix formatting errors, run the following:

yarn lint --fix

Docs