Tabs are a horizontal region of buttons or links that allow for a consistent navigation experience between screens. It can contain any combination of text and icons, and is a popular method for enabling mobile navigation.
Replacing Component: react-native-scrollable-tab-view <ScrollableTabView>
Syntax
import React, { Component } from 'react';
import { Container, Header, Content, Tab, Tabs } from 'native-base';
import Tab1 from './tabOne';
import Tab2 from './tabTwo';
export default class TabsExample extends Component {
render() {
return (
<Container>
<Header hasTabs />
<Tabs initialPage={1}>
<Tab heading="Tab1">
<Tab1 />
</Tab>
<Tab heading="Tab2">
<Tab2 />
</Tab>
<Tab heading="Tab3">
<Tab3 />
</Tab>
</Tabs>
</Container>
);
}
}Configuration
| Property | Default | Option | Description |
|---|---|---|---|
| locked | false | boolean | Disable swipe |
| initialPage | - | integer | Set default active tab |
| page | - | - | Set selected tab |
| tabBarPosition | top | top, bottom, overlayTop, overlayBottom | Set position of Tabs |
| tabBarUnderlineStyle | - | - | Style of the default tab bar's underline |
| onChangeTab | Function | - | Function to call when tab changes |
| onScroll | Function | - | Function to call when pages are sliding |
Known Issues : Custom tabHeading is not yet supported for ScrollableTab heading only accepts a string.
Pro-Tip : It is advisable to use hasTabs prop with Header while using Tabs.

