Skip to content

JBPartin/react-carousel

Repository files navigation

react-carousel

A simple react component that allows you to easily make a carousel slider.

NPM JavaScript Style Guide

Install

npm install @jbpartin/react-carousel

Usage

import React, { Component } from 'react'
import Carousel from '@jbpartin/react-carousel'
import 'react-carousel/dist/index.css'

class Example extends Component {
  render() {
    return (
      <Carousel
        responsive={{
          large: {
            toShow: 5,
            toSlide: 5
          },
          desktop: {
            toShow: 4,
            toSlide: 4
          },
          ipad: {
            toShow: 3,
            toSlide: 3
          },
          mobile: {
            toShow: 2,
            toSlide: 2
          }
        }}
      >
        <div></div>
        <div></div>
        <div></div>
        <div></div>
      </Carousel>
    )
  }
}

License

MIT © JBPartin

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published