0.7.6 • Published 6 years ago

react-native-bottom-navigation v0.7.6

Weekly downloads
9
License
MIT
Repository
github
Last release
6 years ago

react-native-bottom-navigation

This is a top-level component following the 'Bottom navigation' Material Design specifications.

Installation

npm install --save react-native-bottom-navigation

Using RNPM (React-Native Package Manager):

rnpm link react-native-bottom-navigation

Manually (iOS):

  1. Add node_modules/react-native-bottom-navigation/iOS/RCTBottomNavigation.xcodeproj to your xcode project, usually under the Libraries group

  2. Add libRCTBottomNavigation.a (from Products under RCTBottomNavigation.xcodeproj) to build target's Linked Frameworks and Libraries list

Manually (Android):

  1. Add the following snippet to your android/settings.gradle:

    include ':RNBottomNavigation'
    project(':RNBottomNavigation').projectDir = file('../node_modules/react-native-bottom-navigation/android')
  2. Declare the dependency in your android/app/build.gradle

    dependencies {
      ...
      compile project(':RNBottomNavigation')
    }
  3. In your MainActivity.java, make the following changes:

    import com.github.orhan.bottomnavigation.ReactBottomNavigationPackage;     <-- Import this!
    
    ...
    
    @Override protected
    List<ReactPackage> getPackages() {
      return Arrays.asList(
        new MainReactPackage(),
        new ReactBottomNavigationPackage()                                     <-- Add this!
      );
    }

Usage

const BottomNavigation = require('react-native-bottom-navigation');

<BottomNavigation
  style={styles.container}
  activeColor="rgb(0, 100, 125)"
  inactiveColor="#757575"
  >
  <View
    style={styles.child}
    tabLabel="Tab 1"
    tabIcon={require('./icons/ic_tab_1.png')}
    />

  <View
    style={styles.child}
    tabLabel="Tab 2"
    tabIcon={require('./icons/ic_tab_2.png')}
    />

  <View
    style={styles.child}
    tabLabel="Tab 3"
    tabIcon={require('./icons/ic_tab_3.png')}
    />

  <View
    style={styles.child}
    tabLabel="Tab 4"
    tabIcon={require('./icons/ic_tab_4.png')}
    />
</BottomNavigation>

Example Project

You can check out the Example Project to get a better understanding of this library.

Props Reference

TODO

Acknowledgements

This library is based on the fantastic work of the React-Native Material-Kit by xinthink. So if you are interested in having the ripple effect in other areas of your app, you can check that library out.


MIT Licensed

0.7.6

6 years ago

0.7.5

6 years ago

0.7.4

6 years ago

0.7.3

6 years ago

0.7.2

6 years ago

0.7.1

6 years ago

0.7.0

6 years ago

0.6.9

6 years ago

0.6.8

6 years ago

0.6.7

6 years ago

0.6.6

6 years ago

0.6.5

6 years ago

0.6.4

6 years ago

0.6.3

6 years ago

0.6.2

6 years ago

0.6.1

6 years ago

0.6.0

6 years ago

0.5.9

6 years ago

0.5.8

6 years ago

0.5.7

6 years ago

0.5.6

6 years ago

0.5.5

6 years ago

0.5.4

6 years ago

0.5.3

6 years ago

0.5.2

6 years ago

0.5.1

6 years ago

0.5.0

6 years ago

0.4.9

6 years ago

0.4.8

6 years ago

0.4.7

6 years ago

0.4.6

6 years ago

0.4.5

6 years ago

0.4.4

6 years ago

0.4.3

6 years ago

0.4.2

6 years ago

0.4.1

6 years ago

0.4.0

6 years ago

0.3.9

6 years ago

0.3.8

6 years ago

0.3.7

6 years ago

0.3.6

6 years ago

0.3.5

6 years ago

0.3.4

6 years ago

0.3.3

6 years ago

0.3.1

6 years ago

0.3.0

6 years ago

0.2.9

6 years ago

0.2.8

6 years ago

0.2.7

6 years ago

0.2.6

6 years ago

0.2.5

6 years ago

0.2.0

6 years ago

0.1.9

6 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.3

7 years ago

0.1.1

8 years ago

0.1.0

8 years ago