Coder Social home page Coder Social logo

jljlpch / react-native-animated-tabs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from philipshurpik/react-native-animated-tabs

0.0 2.0 0.0 4.79 MB

Animated Tabs for React Native. Both for iOS and Android

Python 9.70% Java 6.65% JavaScript 50.50% Objective-C 33.15%

react-native-animated-tabs's Introduction

react-native-animated-tabs

Animated Tabs for React Native. Both for iOS and Android. Just swipe between tabs to navigate.

Changelog:

v 1.1.0

  • Fixed bug on Android
  • Supported navigation between tabs with external buttons (see example)

Usage:

npm i react-native-animated-tabs --save

Example of usage:

<AnimatedTabs>
    <View style={styles.tabContent}>
        <Text style={styles.text}>Tab 1 Content</Text>
    </View>
    <View style={styles.tabContent}>
        <Text style={styles.text}>Tab 2 Content</Text>
    </View>
    <View style={styles.tabContent}>
        <Image style={styles.image} source={require('./images/cat1.gif')} resizeMode='stretch'/>
    </View>
</AnimatedTabs> 

More - in example folder


API:

Property Type Description Default value
activePanel number active panel 0
animatedConfig object spring animation properties { tension: 70, friction: 10 }
onAnimate function animate start callback, returns next active panel index
onAnimateFinish function animate finish callback, returns next active panel index
panelStyle object animated view styles
panelWidth number animated view width deviceWidth / 1.4
swipeThreshold number threshold - to start or cancel swipe deviceWidth / 7
sidePanelOpacity number opacity of not active panels 1
sidePanelScale number scale of not active panels 0.8

react-native-animated-tabs's People

Contributors

philipshurpik avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.