/react-rcarousel

Simple Carousel component for React

Primary LanguageJavaScript

RCarousel

Simple Carousel component for React

Installation

$ npm install -D oieduardorabelo/react-rcarousel

Example

You can check a real example in example/ dir

import { RCarouselConnect, RCarousel } from 'react-rcarousel'

const HomeCarousel = (props) => (
  <div>
    <RCarousel currentIndex={props.index}>
      <div>Slide one</div>
      <div>Slide two</div>
      <div>Slide three</div>
    </RCarousel>
    <button type="button" onClick={props.previous}>Previous</button>
    <button type="button" onClick={props.next}>Next</button>
  </div>
)

const HomeCarouselConnected = RCarouselConnect(HomeCarousel)

// Render your connected carousel

Badges


eduardorabelo.me  ·  GitHub @oieduardorabelo  ·  Twitter @oieduardorabelo