npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

react-slideshow-carousel

v2.1.0

Published

simple & customizable carousel built using ReactJS

Readme

react-slideshow-carousel

simple & easy to use customizable slideshow carousel built using ReactJS

Installation

npm i react-slideshow-carousel --save

Also install node-sass & sass-loader if already not installed in your application

npm i node-sass sass-loader --save

Usage

import React, Component from 'react';
import ReactCarousel from 'react-slideshow-carousel';

export default function MyComponent (props) {
    const myImages = ['assets/image1', 'assets/image2'];// an array of image paths
    const myConfig = {
        "data": myImages, 
        "infinite": true, 
        "tofro" : false, 
        "autoplay": true, 
        "idleTime" : 3000, // 3 seconds
        "showCaption": true,
        "showSlideNum" : true,
        "showDots": true,
        "showArrows": 'both'
    };
    return <MyComponent config = {myConfig}/>;
}

Options

all the below configuration options (settings) should be passed as props in the form of an object named 'config' as shown in the example above.

  1. data : an array of image paths

  2. infinite : a boolean to specify whether infinite looping is on or off

    • possible values: true | false ; true by default
  3. tofro : a boolean to specify whether to & fro oscillation of slides should be enabled.

    • possible values: true | false ; false by default
    • 'infinite' has highest priority than 'tofro', hence if 'inifnite' is true, the value of 'tofro' will not be conisdered
    • If 'inifinite' is false and 'tofro' is true, the slideshow will move back & forth after reaching the edge slides, e.g, when the slideshow reaches the last slide, it will move back one slide at a time till the beginning, and again toward the end
    • 'autoplay' should be true for 'tofro' to work
  4. autoplay : a boolean to indicate if the slideshow should play automatically

    • possible values: true | false ; true by default
    • If this value is false, user has to manually click the dots or arrows to move to corresponding slide
  5. idleTime : time in milliseconds to specify how long a slide should appear, before moving to the next

    • possible values: any number > 0 ; default value is 3000, which is equal to 3 seconds
  6. showCaption : a boolean value to specify if a caption should be displayed for each slide

    • possible values: true | false ; true by default
  7. showSlideNum : a boolean to specify the number of slides

    • possible values: true | false ; true by default
    • If the value is true, a number will indicate the current slide number & total number of slides, eg., 2/5 means current slide is 2 and total number of slides is 5
  8. showDots : a boolean to show or hide the carousel dots

    • possible values: true | false ; true by default
    • if this value is false, the carousel dots will be hidden
  9. showArrows : a string value to show or hide the carousel arrows.

    • possible values: 'both' | 'prev' | 'next' ; default value is 'both', which means both the left and right arrows will be visible
    • if this value is 'next', only the right/next arrow will be visible
    • if this value is 'prev', only the left/prev arrow will be visible

Test the code

  1. git clone https://github.com/yogeshkumar05/react-slideshow-carousel.git
  2. npm install
  3. npm start
  4. launch http://localhost:3001/

Demo is published at

https://yogeshkumar05.github.io/react-slideshow-carousel/