| IOS | Android |
|---|---|
Syntax
import React, { Component } from 'react';
import { View } from 'react-native';
import { Container, Text } from 'native-base';
import { Tabs, TabContent } from 'native-base';
export default class TabsExample extends Component {
render() {
return (
<Container>
<View>
<Tabs>
<TabContent padder tabLabel='One'>
<Text>This is Tab One</Text>
</TabContent>
<TabContent padder tabLabel='Two'>
<Text>This is Tab Two</Text>
</TabContent>
</Tabs>
</View>
</Container>
);
}
}Configuration
| Property | Default | Option | Description |
|---|---|---|---|
| initialPage | 1 | - | Index of initially selected Tab |
| tabBarPosition | top |
top bottom |
Position of Tabs in the Screen |
| tabLabel | - | - | Name for each tab(TabContent prop) |
| tabIcon | - | - | Icon for each tab(TabContent prop) |
| vertical | false |
true false |
Aligns tabLabel and tabIcon in column |
|
tabBarIconStyle tabBarTextStyle tabBarStyle underlineStyle |
- | - | Styles for tabIcon, tabLabel, Tabs, and underline of Tabs respectively |