1.0.0 • Published 5 months ago

bagpallab7_react_image_carousel v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
5 months ago

Copy to install

npm install bagpallab7_react_image_carousel

import to use the package

import useCarousel from "bagpallab7_react_image_carousel";

Extract the functionality

const [imageIndex,handleLeftClick,handleRightClick,handlePositionClick ] = useCarousel("length of image array", "duration of image change");

While using the image url use this

<img src={image-array-nameimageIndex} />

here imageIndex that you extracted from useCarousel.

How to call other functionality

onClick={handleLeftClick}
onClick={handleRightClick}

How to call go to exact index position

onClick={()=> handlePositionClick("pass current index of the button/position element")}