Giter Club home page Giter Club logo

react-native-animated-bottom-tabbar's Introduction

react-native-animated-bottom-tabbar npm version

typeOne:

typeTwo:

Getting started

$ npm install react-native-animated-bottom-tabbar --save

$ npm install react-native-svg --save

$ react-native link react-native-svg

Usage

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View, Image} from 'react-native';
import {TypeOne,TypeTwo} from "react-native-animated-bottom-tabbar"; //<-----------------import

const instructions = Platform.select({
    ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
    android:
    'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});

//array of icon views this array can be image or vector icon for tab  bar
// array size can be 1 to maximum 5 !
const icons = [
    <Image
        source={require('./menu.png')}
        style={{width: 32, height: 32}}/>,
    <Image
      source={require('./magnify.png')}
        style={{width: 32, height: 32}}/>,
    <Image
       source={require('./message.png')}
        style={{width: 32, height: 32}}/>,
    <Image
        source={require('./volume-low.png')}
        style={{width: 32, height: 32}}/>,
    <Image
       source={require('./map-marker.png')}
       style={{width: 32, height: 32}}/>
];
type Props = {};
export default class App extends Component<Props> {

    render() {
        return (
            <View style={styles.container}>
                <Text style={styles.welcome}>Welcome to React Native!</Text>
                <Text style={styles.instructions}>To get started, edit App.js</Text>
                <Text style={styles.instructions}>{instructions}</Text>
                {/* here*/}
                <TypeTwo // you can use TypeOne Also With the same settings
                    icons={icons} //array of icon views this array can be image or vector icon
                    selectedColor={'#FF8F00'} //color of selected item in tab bar
                    backgroundColor={'#212121'} //background color of tab bar
                    onSelect={(index)=>console.log(index)} //on select an item , index starts at 1 :-D
                />
            </View>
        );
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        justifyContent: 'center',
        alignItems: 'center',
        backgroundColor: '#F5FCFF',
    },
    welcome: {
        fontSize: 20,
        textAlign: 'center',
        margin: 10,
    },
    instructions: {
        textAlign: 'center',
        color: '#333333',
        marginBottom: 5,
    },
});

react-native-animated-bottom-tabbar's People

Contributors

lvlrsajjad avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

react-native-animated-bottom-tabbar's Issues

animation is not working after background to foreground application

when i load it for the first time it works perfectly, but when i press back button and app goes in background then when i come to foreground the bottom bar animation of menu changing is stopped. it navigates through different screens but without navigation animation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.