New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

image-show-react

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

image-show-react

[![NPM version]](https://www.npmjs.com/package/image-show-react)

  • 2.5.1
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

![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

FAQs

Package last updated on 20 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc