0.2.0 • Published 4 years ago

react-native-hl-tabs v0.2.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

react-native-hl-tabs

A beautiful tab for react native

alt text

Installation

npm install react-native-hl-tabs

or

yarn add react-native-hl-tabs

Usage

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>
);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT