This package provides a custom component for integrating the native tab bar of iOS into your React Native app. With this package, you can achieve a seamless native tab navigation experience in the iOS version of your application.
- Integrate iOS's default tab bar into your React Native project.
- Customize the appearance with easy configuration options.
- Ability to customize icons and text for each tab.
-
Using NPM
npm install react-native-ios-tab-bar
- Import the components into your project
import { RNTabBar, RNTabBarOption } from "react-native-ios-tab-bar";
- Use the component in your project
// Within your render function // Wrap options with RNTabBar <RNTabBar> <RNTabBarOption> <Text>Option1</Text> </RNTabBarOption> <RNTabBarOption> <Text>Option2</Text> </RNTabBarOption> </RNTabBar>
Note: None of the options are mandatory!
Option | Type |
---|---|
activeIndex | number |
onActiveIndexChange | ( index: number ) => void |
activeColor | string |
backgroundColor | string |
width | number |
height | number |
borderRadius | number |
padding | number |
Option | Type |
---|---|
index | number |
activeIndex | number |
onActiveChange | ( isActive: boolean ) => void |
onActive | ( ) => void |
onPress | ( ) => void |
All contributions are welcome. If you would like to contribute to this project, feel free to submit pull requests. Prior to making significant changes, I recommend opening an issue to discuss the changes.
This project is licensed under the MIT license. For more information, refer to the LICENSE
file.