react-native-swipe-tabs

1.1.3 • Public • Published

react-native-swipe-tabs

A simple component that makes tabs animatable.

Introducing new Version with Labels

Works on both IOS and Android. Click here to see it in action.

Screenshot 2022-08-08 at 5 04 21 PM

Installation

Just run

npm install --save-exact react-native-swipe-tabs

Update

Just run

npm install react-native-swipe-tabs@">=1.1.0"

Usage

Let us suppose there are some screens "Favourites", "Playlists", "Tracks", "Folders"

Pass labels prop like below to display TabBar

import SwipeableTabs from "react-native-swipe-tabs"
....
class Home extends React.Component<any, any>{

    constructor(props: any) {
        super(props)
        this.state = {
            selectedIndex: 0
        }
    }
    
    render() {
     return (<SwipeableTabs
                onSwipe={x => this.setState({ selectedIndex: x })}
                selectedIndex={this.state.selectedIndex}
                labels={["Favourites","Playlists","Tracks","Folders"]}
                >
                
                <Favourites />
                <Playlists/>
                <Tracks/>
                <Folders/>
                
             </SwipeableTabs>)
    }
}

Misc

Currently I am not allowing pull requests. If you like to suggest a feature, email me to sheharyar.fast@gmail.com. I will get back to you as soon as I can.

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.1.319latest

Version History

VersionDownloads (Last 7 Days)Published
1.1.319
1.1.21
1.1.10
1.1.00
1.0.70
1.0.60
1.0.50
1.0.40
1.0.30
1.0.21
1.0.10
1.0.00

Package Sidebar

Install

npm i react-native-swipe-tabs

Weekly Downloads

15

Version

1.1.3

License

ISC

Unpacked Size

8.9 kB

Total Files

5

Last publish

Collaborators

  • curtx