bagpallab7_react_image_carousel

1.0.0 • Public • Published

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")} 

Package Sidebar

Install

npm i bagpallab7_react_image_carousel

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.72 kB

Total Files

3

Last publish

Collaborators

  • bagpallab7