0.1.1 • Published 5 years ago

react-customizable-carousel v0.1.1

Weekly downloads
76
License
MIT
Repository
github
Last release
5 years ago

Customizable react carousel

Latest version: 0.0.7

DEMO

Simple but effective customizable carousel component.

Running examples locally:

  • clone project
  • run yarn
  • run yarn dev
  • open localhost:8080

Installation

  • Install package
    ```
    yarn add react-customizable-carousel
    ```
  • Import component

    import { Carousel } from 'react-customizable-carousel'
    ...
    
    <Carousel>
      <h1>1</h1>
      <h1>2</h1>
      <h1>3</h1>
      <h1>4</h1>
      <h1>5</h1>
      <h1>6</h1>
    </Carousel>

Props

proptypedefaultinfo
infinitebooleanfalseitems count should be showItemsCount + 1
showItemsCountinteger3
transitionDurationNumber0.5Slide animation duration (seconds)
nextArrowfunction/classFaAngleRightA function/class of component to extend default next arrow. See examples
prevArrowfunction/classFaAngleLeftA function/class of component to extend default prev arrow. See examples
showDotsbooleanfalseShow dots navigation flag
dotfunction/classFaCircleO / FaCircleA function/class of component to extend default dot. props.current (boolean) will be passed to it. See examples
enableDragScrollbooleantruePass false to disable drag scroll
enable3dbooleanfalseExperimental feature. Currently it WON'T work properly with enabled dots
effectOf3dobject{ name: 'scale' }Experimental feature. Available effects: { name: 'scale' }, { name: 'daw', dawStep: 50 }. For daw you must provide dawStep and set bigger height of the List component using css. See example.

ClassName Props

proptypedefaultinfo
classNamestring''Will be added provided className to main wrapper
arrowWrapperClassNamestring''Will be added provided className to Arrow wrapper. Also will be added arrowWrapperClassName--prev and arrowWrapperClassName--next to corresponding arrows
dotWrapperClassNamestring''Will be added provided className to Dot wrapper
dotsWrapperClassNamestring''Will be added provided className to Dots wrapper
listWrapperClassNamestring''Will be added provided className to List wrapper
0.1.1

5 years ago

0.1.0

5 years ago

0.0.7

7 years ago

0.0.6

7 years ago

0.0.5

7 years ago

0.0.4

7 years ago

0.0.3

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago