1.1.4 • Published 4 years ago

react-native-image-carousel-slider v1.1.4

Weekly downloads
2
License
ISC
Repository
github
Last release
4 years ago

👨‍💻 react-native-image-carousel-slider

BUILD SETUP

## Installation

npm install react-native-image-carousel-slider --save

USAGE

import CarouselDisplay from react-native-image-carousel-slider
const image = ['https://www.bradykesner.com/wp-content/uploads/2016/11/clingmans-dome-sunset-smoky-mountain-national-park-1030x687.jpg',
'https://www.nps.gov/blri/learn/nature/images/Bear-Trap-Gap-MP-428-robert-Stevens-web.jpg?maxwidth=1200&maxheight=1200&autorotate=false',
'https://static.rootsrated.com/image/upload/s--U0wjV1dP--/t_rr_large_traditional/kzw1j2a9jcad36x6ytof.jpg'
]
class App extends Component {
    state={
        active:0
    }
     handleMovements = ({nativeEvent}) => {
    const slide = Math.ceil(
      nativeEvent.contentOffset.x / nativeEvent.layoutMeasurement.width,
    );
    if (slide !== this.state.active) {
      this.setState({
        active: slide,
      });
    }
  };
    render(){
        return(
            <CarouselDisplay 
            screen={'DisplayFullImages'} 
          fixedData={carDetails[1].image}
          screenNavigation={this.props.navigation}
          active={this.state.active}
          handleMovements={this.handleMovements}
        />

       
        )
    }
}

Current API(Property)

PropertyTypeDescription
screenPropTypes.string(optional)Screen Navigation and will passing property 'detailImage' as array
fixedDataPropTypes.array(required) Array Of Image
screenNavigationPropTypes.function(optional) navigation function
activePropTypes.numberdisplay active image that choosed
handleMovementsPropTypes.objectNative Event

Project Documentation

  • Author Account
Arwy Syahputra Siregar
github.com/arwysyah
1.1.4

4 years ago

1.1.3

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.1.2

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.3

4 years ago

1.0.0

4 years ago