New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

react-horizontal-carousel

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-horizontal-carousel

a carousel component using render props.

latest
Source
npmnpm
Version
1.1.1
Version published
Maintainers
1
Created
Source

a carousel component using render props.

Usage

Docs coming soon! For now, use the stories folder to see some code examples.

function BasicCarousel() {
  return (
    <Carousel
      slideCount={6}
      slideDuration={10000}
      animationDuration={1500}
      render={({
        getRootProps,
        getPrevButtonProps,
        getWindowProps,
        getTrackProps,
        getNextSlideProps,
        getCurrentSlideProps,
        getPrevSlideProps,
        getNextButtonProps,
        getIndicatorListProps,
        getIndicatorProps,
        prevIndex,
        currentIndex,
        nextIndex,
        slideCount,
      }) => (
        <div {...getRootProps({className: 'slider'})}>
          <button {...getPrevButtonProps({className: 'prev-btn'})}>Prev</button>
          <div {...getWindowProps({refKey: 'innerRef', className: 'window'})}>
            <div {...getTrackProps({className: 'track'})}>
              <div {...getPrevSlideProps({className: 'slide'})}>
                <h2>{prevIndex}</h2>
              </div>
              <div {...getCurrentSlideProps({className: 'slide'})}>
                <h2>{currentIndex}</h2>
              </div>
              <div {...getNextSlideProps({className: 'slide'})}>
                <h2>{nextIndex}</h2>
              </div>
            </div>
          </div>
          <button {...getNextButtonProps({className: 'next-btn'})}>Next</button>
          <ul {...getIndicatorListProps({className: 'dots'})}>
            {Array.from({length: slideCount}).map((_, idx) => (
              <li
                key={idx}
                {...getIndicatorProps({index: idx, className: 'dot'})}
              >
                {idx}
              </li>
            ))}
          </ul>
        </div>
      )}
    />
  )
}

Keywords

react

FAQs

Package last updated on 04 Apr 2018

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