Skip to content

Latest commit

 

History

History
91 lines (87 loc) · 2.62 KB

Tabs-Scrollable.md

File metadata and controls

91 lines (87 loc) · 2.62 KB

tabs-scrollable-headref

Scrollable Tabs

Preview ios tabs-scrollable-headref Preview android tabs-scrollable-headref

Syntax

import React, { Component } from 'react';
import { Container, Header, Tab, Tabs, ScrollableTab } from 'native-base';
import Tab1 from './tabOne';
import Tab2 from './tabTwo';
​export default class TabsScrollableExample extends Component {
  render() {
    return (
      <Container>
        <Header hasTabs/>
        <Tabs renderTabBar={()=> <ScrollableTab />}>
          <Tab heading="Tab1">
            <Tab1 />
          </Tab>
          <Tab heading="Tab2">
            <Tab2 />
          </Tab>
          <Tab heading="Tab3">
            <Tab3 />
          </Tab>
          <Tab heading="Tab4">
            <Tab4 />
          </Tab>
          <Tab heading="Tab5">
            <Tab5 />
          </Tab>
        </Tabs>
      </Container>
    );
  }
}

Property Default Option Description
heading - string, Label String, or 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