🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

react-native-scrolltab

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-scrolltab

ScrollTab

latest
Source
npmnpm
Version
0.1.1
Version published
Maintainers
1
Created
Source

ScrollTab

效果展示

安装方法

npm i --save react-native-scrolltab

js 调用

import ScrollTab from 'react-native-scrolltab';

export default class exsample extends Component {
  // 构造
    constructor(props) {
      super(props);
      // 初始状态
      this.state = {
          activeTab: 0
      };
    }
  render() {
    return (
      <View style={{flex: 1, justifyContent: 'center', alignItems: 'center', backgroundColor: '#F5FCFF'}}}>
        <ScrollTab tabs={['item1','item2','item3','item-4-item','item5','item6','item7','item8']}
             activeTab={this.state.activeTab}
             goToPage={(index)=>{this.setState({activeTab: index})}}
        />
      </View>
    );
  }
}

Keywords

scroll

FAQs

Package last updated on 10 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts