0.3.1 • Published 3 years ago

react-native-scrollable-tab-header v0.3.1

Weekly downloads
51
License
ISC
Repository
github
Last release
3 years ago

react-native-scrollable-tab-header

Separate tab header component which gives you relevant callbacks to build your own tab implementation. Very smooth with no frame drops.

import ScrollableTabs from "react-native-scrollable-tab-header";

<ScrollableTabs inactiveTextColor="white"
                backgroundColor={Colors.signatureBlue}
                underlineStyle={{backgroundColor:'gold'}}
                activeTextColor='white'
                ref={(ref)=>{this._scrollTabs = ref}}
                goToPage={(i)=>
                { this._recyclerlistview.scrollToIndex(i, true) }}
                tabs={["FIRST TAB", "SECOND LONG TAB"]} />

To update tabs call updateOffsetExternal(currentOffset, pageWidth) on ref of scrollable tabs. Note: pageWidth is width of one tab scene (mostly screen width), on goToPage callback you're supposed to scroll you container to specified position.

You might also call it as updateOffsetExternal(positionInDecimal, 1)

For additional feature explore props of the component.

This is a modified version of 'ScrollableTabBar' component available at: https://github.com/skv-headless/react-native-scrollable-tab-view

0.3.1

3 years ago

0.2.8

5 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.8

7 years ago

0.1.7

7 years ago

0.1.6

7 years ago

0.1.5

7 years ago

0.1.4

7 years ago

0.1.3

7 years ago

0.1.2

7 years ago

0.1.1

7 years ago

0.1.0

7 years ago