1.0.0 • Published 5 months ago
bagpallab7_react_image_carousel v1.0.0
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-name
imageIndex
} />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")}
1.0.0
5 months ago