0.0.7 • Published 10 months ago

react-native-big-tab-bar v0.0.7

Weekly downloads
3
License
MIT
Repository
github
Last release
10 months ago

Demo

Installation

Add the dependency:

npm i react-native-big-tab-bar

Peer Dependencies

IMPORTANT! You need install them
"react-native-androw": "0.0.34"

Usage

Import

import BigTabBar from "react-native-big-tab-bar";

Data Model

export type ITabBar = {
  id: number;
  text: string;
  number?: number;
  image?: any;
};

Example Data

[{
    id: 0,
    text: 'Monday',
    number: 8,
  },
  {
    id: 1,
    text: 'Tuesday',
    image: {
      uri: 'https://image.winudf.com/v2/image/Y29tLnNnbS5iZWFjaHdhbGxwYXBlcmhkX3NjcmVlbnNob3RzXzJfZjRhOGQ4MzQ/screen-2.jpg?fakeurl=1&type=.jpg',
    },
  }
}

Example Usage

<BigTabBar tabs={tabs} />

Configuration - Props

PropertyTypeDefaultDescription
tabsarraySet your tab bar items
textStylestyle-set your custom text style
firstSelectedItemnumber0set your initial item
heightnumber120change the button's height
widthnumber75change the button's width
borderRadiusnumber36change the button's border radius
borderColorstring"#E8E8E8"change the button's border color
shadowColorstring"#757575"change the button's shadow color
innerContainerHeightnumber50set the height of the inner container
innerContainerWeightnumber50set the width of the inner container
innerContainerBorderRadiusnumber25set the border radius of the inner container
inActiveBackgroundColorstring"#fff"set the background color when it is inactive
inActiveTextColorstring"#3A3A3A"set the text color when it is inactive
activeTextColorstring"#fff"set the text color when it is active
ImageComponentImage
imageStylestyle-set your custom image style
textIsActivebooleanfalsethe number can be displayed on the inner container (instead of image)
innerActiveTextColorstring"#F5C812"if there are numbers in the inner container, you can change the color when it is active
innerInActiveTextColorstring"#F5C812"if there are numbers in the inner container, you can change the color when it is inactive
activeTextColorstring"#fff"set the text color when it is active
innerTextStylestyleset your custom text style
activeBackgroundColorstring"#F5C812"set your active background color
activeInnerContainerBackgroundColorstyle"#fff"set the color of the inner container when it is active
innerActiveTextColorstring"#F5C812"if there are numbers in the inner container, you can change the color when it is active
onPressfunction()set your own function when onPress
onChangefunction()set your own function when onChange

Future Plans

  • LICENSE

Change Log

Change log will be here !

Author

Sevval Eygul, sevvalleygull@gmail.com

License

React Native Big Tab Bar is available under the MIT license. See the LICENSE file for more info.