react-native-hl-tabs
TypeScript icon, indicating that this package has built-in type declarations

0.2.0 • Public • Published

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

Package Sidebar

Install

npm i react-native-hl-tabs

Weekly Downloads

1

Version

0.2.0

License

MIT

Unpacked Size

24.5 kB

Total Files

9

Last publish

Collaborators

  • huylv