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 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-jollof-slider

v0.1.4

Published

A lightweight, responsive, SSR supported, well tested, React.js slider component with autoplay support.

Downloads

28

Readme

react-jollof-slider

npm version minified + gzip typescript GitHub license

A lightweight, responsive, SSR supported, well tested, React.js slider component with autoplay support (autoplay pauses when an item is hovered). Customizable

Table of contents

Installation

npm

npm install react-jollof-slider

yarn

yarn add react-jollof-slider

Usage

Basic Example:

import { JollofSlider, SliderItem } from 'react-jollof-slider'

const items = [1, 2, 3, 4, 5]

function App() {
  return (
    <div className="App">
      <JollofSlider numberOfItems={items.length} isAutoplay isShowArrowNav={false} isShowDotNav>
        {items.map((text) => (
          <SliderItem key={text}>
            <div
              style={{
                backgroundColor: '#000000',
                color: '#c4c4c4',
                width: '100%',
                height: '18.25rem',
                padding: '1rem',
                display: 'grid',
                placeItems: 'center',
              }}
            >
              <p style={{ fontSize: '2rem' }}>{text}</p>
            </div>
          </SliderItem>
        ))}
      </JollofSlider>
    </div>
  )
}

export default App

Props

| Name | Type | Default Value | Description | | -------------------- | ------- | ------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | *numberOfItems | number | | Number of items to be displayed in the slider | | customWidth | object | {xs:240,sm:340,lg:490} | The width of individual slider items at different screen sizes. lg: min-width(600px), sm: min-width(370px), xs: screens below 370px width . The width values should be provided in pixels. | | isAutoplay | boolean | false | Add autoplay functionality | | isShowDotNav | boolean | false | Show navigation with dots which also indicate current slider position | | isShowArrowNav | boolean | true | Show buttons for moving slides forward and backward | | children | node | null | slider items | | forwardIcon | node | undefined | Icon for the forward navigation button | | backwardIcon | node | undefined | Icon for the backward navigation button | | autoPlayInterval | number | 3 | Interval (in seconds) between slide changes during autoplay. | | flexgap | number | 16 | Gap (in pixels) between slider items | | themeColor | string | #000000 | color of elements like buttons and indicators in the slider |

Demo

Edit react-jollof-slider-demo