1.0.5 • Published 5 months ago

react-carousel-package-2 v1.0.5

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

React Carousel Package

A lightweight, customizable carousel component for React applications.

📦 Installation

Install the package via npm:

npm install react-carousel-package-2

🚀 Usage

Here’s a basic example of how to use the carousel:

import React from "react";
import Carousel from "react-carousel-package-2";

const images = [
  { src: "image1.jpg", description: "Slide 1" },
  { src: "image2.jpg", description: "Slide 2" },
  { src: "image3.jpg", description: "Slide 3" },
];

const App = () => {
  return (
    <Carousel
      images={images}
      autoPlay={true}
      interval={3000}
      infinite={true}
      showArrows={true}
      showIndicators={true}
    />
  );
};

export default App;

⚙️ Props

Prop NameTypeDefaultDescription
imagesImagesData[]RequiredArray of image data objects (src and description).
autoPlaybooleantrueEnables autoplay functionality.
intervalnumber3000Interval for autoplay in milliseconds.
infinitebooleantrueEnables infinite scrolling of slides.
showArrowsbooleantrueToggles visibility of navigation arrows.
showIndicatorsbooleantrueToggles visibility of slide indicators.
leftArrowContentReact.ReactNode"❮"Content for the left arrow button.
rightArrowContentReact.ReactNode"❯"Content for the right arrow button.
arrowStyleReact.CSSProperties{}Custom styles for the navigation arrows.
containerStyleReact.CSSProperties{}Custom styles for the entire carousel container.
heightstring"100%"Sets the height of the carousel.
1.0.5

5 months ago

1.0.4

5 months ago

1.0.3

5 months ago

1.0.2

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago