Giter Site home page Giter Site logo

logisticinfotech / react-native-custom-swiper Goto Github PK

View Code? Open in Web Editor NEW
13.0 5.0 5.0 15.93 MB

React Native Custom Swiper

Home Page: https://www.logisticinfotech.com/blog/custom-swiper-react-native-flatlist/

License: MIT License

JavaScript 100.00%
react-native swiper react-native-app react-native-swiper custom-swiper mobile-application logistic-infotech library android

react-native-custom-swiper's Introduction

npm version

React Native custom swiper using Flatlist

Use images or custom views for swiping, Please refer this blog to use this library.

Installation

npm i react-native-custom-swiper

Properties

Basic

Prop Default Type Description
swipeData [] array Array of data which user want to show in swiper
renderSwipeItem ()=>{} function Create element of swiper
currentSelectIndex 0 number Index of initial screen.
showSwipeBtn true bool For hide or show left/right button
style Default style object Change swiper style
onScreenChange (index) => {} func Function call when screen changed
leftButtonImage Default left Arrow source {required("leftArrowString")} string Modify left arrow image
rightButtonImage Default right Arrow source {required("rightArrowString")} string Modify right arrow image
containerWidth Screen width number Customize swiper screen width
backgroundColor "white" string Customize swiper background color
autoplay true bool Change slide index automatically
autoplayTimeout 2500 number Delay between every slide (in Second)

react-native-custom-swiper's People

Contributors

kikaninilesh avatar nileshkikani avatar nive745 avatar pankajdevfrontend avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

react-native-custom-swiper's Issues

currentSelectIndex property doesn't work

<Swiper
    style={{ flex: 1 }}
    currentSelectIndex={0}
    swipeData={data}
    renderSwipeItem={this._renderItem}
    onScreenChange={this.screenChange}
    showSwipeBtn={false}
    currentSelectIndex={10}
/>

currentSelectIndex seems not working on Android
I have an array of 20 data, and I want to start in the middle but it always start by the first element

autoplay not working

my code is :
`<Swiperr

                style={{ flex: 1 }}

                currentSelectIndex={0}

                swipeData={this.state.items}

                renderSwipeItem={this.renderImageSwipeItem}

                onScreenChange={this.screenChange}

                backgroundColor="#fff"

                autoplay={true}

                autoplayTimeout={50}

            />`

and it does not automatically play next slider

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.