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
{% codetabs name="React Native", type="js" -%} import React, { Component } from 'react'; import { Container, Header, Content, Tab, Tabs } from 'native-base'; import Tab1 from './tabOne'; import Tab2 from './tabTwo'; import Tab3 from './tabThree'; export default class TabsExample extends Component { render() { return (
); } } {%- language name="Vue Native", type="vue" -%} <script> import TabOne from "./components/tabOne"; import TabTwo from "./components/tabTwo"; import TabThree from "./components/tabThree"; export default { components: { TabOne, TabTwo, TabThree } }; </script>{%- endcodetabs %}
Configuration(Tabs)
| Property | Default | Option | Description |
|---|---|---|---|
| scrollWithoutAnimation | false | boolean | Disable Tab Change Animation |
| 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 |
Configuration(Tab,TabHeading)
| Property | Default | Option | Description |
|---|---|---|---|
| disabled(only for Tab) | false | boolean | Disables click option for tab |
| heading(only for Tab) | - | string | Label String, or Component |
| style(only for TabHeading) | - | style object | Style for TabHeading Component |
| tabStyle | - | style object | Style for tab bar |
| activeTabStyle | - | style object | Style for active tab bar |
| textStyle | - | style object | Style for text |
| activeTextStyle | - | style object | Style for active text |
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.


