在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):iRoachie/react-native-material-tabs开源软件地址(OpenSource Url):https://github.com/iRoachie/react-native-material-tabs开源编程语言(OpenSource Language):TypeScript 66.1%开源软件介绍(OpenSource Introduction):React Native Material TabsMaterial Design implementation of Tabs Getting StartedStep 1Install the dependency npm i --save react-native-material-tabs Or if you use yarn yarn add react-native-material-tabs Step 2Start using the component import MaterialTabs from 'react-native-material-tabs'; Usageimport React, { useState } from 'react';
import { StyleSheet, SafeAreaView } from 'react-native';
import MaterialTabs from 'react-native-material-tabs';
const Example = () => {
const [selectedTab, setSelectedTab] = useState(0);
return (
<SafeAreaView style={styles.container}>
<MaterialTabs
items={['One', 'Two', 'Three', 'Four', 'Five']}
selectedIndex={selectedTab}
onChange={setSelectedTab}
barColor="#1fbcd2"
indicatorColor="#fffe94"
activeTextColor="white"
/>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
container: {
flex: 1,
},
}); Available Props
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论