2.5.0 • Published 1 year ago

image-show-react v2.5.0

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Simple Image Show Library

NPM version

A simple and customizable image carousel component library for React.

Features

  • Easy to use and integrate.
  • Fully customizable.
  • Supports automatic slide transitions.

Installation

You can install the package using npm or yarn:

npm install react-image-carousel

or 

yarn add react-image-carousel

Usage

Here's a basic example of how to use the ImageCarousel component in your React project:

1. Import the Component

First, import the ImageCarousel component into your project:

import React from 'react';
import ImageCarousel from 'react-image-carousel';
import 'react-image-carousel/dist/index.css'; 

2. Use the Component

Then, use the ImageCarousel component and pass the required props:

const images = [
  'https://via.placeholder.com/800x300',
  'https://via.placeholder.com/800x300', 
  'https://via.placeholder.com/800x300',
];

const App = () => {
  return (
    <div>
      <h1>React Image Carousel Example</h1>
      <ImageCarousel images={images} autoPlay={true} animation={"default"} />
    </div>
  );
};

export default App;

Props

NameTypeDefaultDescription
imagesArray[]Array of images
itemWidthnumber''Image Width
itemHeightnumberfalseImage Height
animationstringdefaultImage Slide Animation
autoPlaybooleanfalseAuto playing of Images
loopbooleantrueLoop over the Images
dotStylestyle{}Nav Dot Style
navDotsContainerStylestyle{}Nav Dot Container Style
imageContainerStylestring{}Image Container Style Prop
imagePropsStylestyle{}Each image Style Prop
buttonContainerStylestyle{}Previous & Next Button Container Style Prop
leftButtonStylestyle{}Previous Button Style Prop
rightButtonStylestyle{}Next Button Style Prop
onImageLoadfunctionnullA Callback called after Image Load
onLeftBtnPressfunctionnullA Callback on Left Button Press
onRightBtnPressfunctionnullA Callback on Right Button Press.
autoPlayDurationnumber5000Auto Play animation Duration in ms
fadeInEffectDurationnumber3000Fade In Animation Duration in ms
activeNavDotWidthnumber10Active Nav Dot Width
nonActiveNavDotWidthnumber5Non Active Nav Dot Width
activeNavDotColorstring#ffffActive Nav Dot Color
nonActiveNavDotColorstringgreyNon Active Nav Dot Color
imageCarouselContainerStylestyle{}Image Carousel Container Style
showVerticalScrollBarbooleantrueShow Scroll Bar
2.5.0

1 year ago

2.4.0

1 year ago

2.2.0

1 year ago

2.1.1

1 year ago

2.1.0

1 year ago

2.0.0

1 year ago

1.0.0

1 year ago