A tabbar component for React Native
npm install @tisch7/react-native-tab-bar-interactionThis package is a fork from https://github.com/Mindinventory/react-native-tabbar-interaction
It accepts 5 icons instead of 3
npm i mindinventory/react-native-tab-bar-interaction
react-native run-android
react-native run-ios
js
import TabBar from "@mindinventory/react-native-tab-bar-interaction";
...
render() {
return (
screenBackgroundColor={{ backgroundColor: '#008080' }}
>
{/Page Content/}
icon={require('./tab2.png')}
selectedIcon={require('./tab1.png')}
title="Tab2"
screenBackgroundColor={{ backgroundColor: '#F08080' }}
>
{/Page Content/}
icon={require('./tab3.png')}
selectedIcon={require('./tab1.png')}
title="Tab3"
screenBackgroundColor={{ backgroundColor: '#485d72' }}
>
{/Page Content/}
);
}
`
Component props
| prop | value | required/optional | description |
| --- | --- | --- | --- |
| icon | image source | required | the icon when item is not focus |
| selectedIcon | image source | required | the icon when item is focus |
| title | string | required | title of item |
| screenBackgroundColor | string | required | background color of screen |
| bgNavBar | string | option | background color of nav |
| bgNavBarSelector | string | option | background color of nav selected |
| stroke | string | option | border color of nav |
Dependencies
* react-native-svg`