A beautiful tab for react native
npm install react-native-hl-tabs
or
yarn add react-native-hl-tabs
import HLTabs from 'react-native-hl-tabs';
// ...
const [selectedIndex, setSelectedIndex] = React.useState < number > 0;
const titles: string[] = ['Tab1', 'Tab2 with very long text', 'Tab3'];
const onPressTab = (index: number) => {
setSelectedIndex(index);
};
return (
<View>
<HLTabs
titles={titles}
onPress={onPressTab}
selectedIndex={selectedIndex}
/>
</View>
);
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT