0.0.2 • Published 6 years ago

material-carousel v0.0.2

Weekly downloads
66
License
MIT
Repository
github
Last release
6 years ago

material-carousel

The component does not depend on any projects.

Install

npm install --save material-carousel
Then use it.
import Carousel from 'material-carousel';
<Carousel data={data} />

Config Options

NameTypeDefaultRequiredDescription
classesObjectNUseful to extend the style applied to components
dataArray[]YData
data.urlStringYImage url
directionString'rtl'NRoll direction
isAutoPlayBooleantrueNWhether to play automatically
intervalNumber4000NDelay between roll (in ms)
onClickFunctionNGives two arguments. Clicked image data and clicked image index

CSS API

You can override all the class names injected by Material-carousel thanks to the classes property. This property accepts the following keys:

  • root
  • carouselGroup
  • carouselItem
  • dots
  • dot
  • active