react-leaf-carousel
React simple infinite carousel with lazy loading and responsive support.
Installation
Example
Properties
Property | Type | Description | Default |
---|---|---|---|
arrows | bool | Enables tabbing and arrow key navigation | true |
dots | bool | Enable dot pagination | false |
lazyLoad | bool | Lazy load slides that are not visible at first load | true |
swipe | bool | Add swipe event to scroll between slide pages | true |
animationDuration | int | Slide animation duration | 500 |
slidesToShow | int | Number of slides to display | 1 |
slidesToScroll | int | Number of slides to scroll | 1 |
slidesSpacing | int | Margin between slides | 10 |
autoCycle | bool | Enables autocycle between slide pages | false |
cycleInterval | bool | Autocycle interval duration | 5000 |
pauseOnHover | bool | Pauses autocycle | true |
responsive | bool | Enables breakpoints | true |
breakpoints | array | Array of objects in the form of { breakpoint: int, settings: { ... } } |
[] |
placeholderImageSrc | string | placeholder image source | base64 gif image 1x1 |
nextArrow | React element | Optional custom arrow | null |
prevArrow | React element | Optional custom arrow | null |
scrollOnDevice | bool | Adds scroll functionality on touch devices instead of normal swipe, this disables lazy-loading, infinite navigation, arrows and dots | false |
showSides | bool | Show outer prev/next slides of the current slide page | false |
sidesOpacity | int | Side slides opacity amount | 1 |
sideSize | int | Fraction visible of prev/next slides, when showSides is enabled |
.5 |
incrementalSides | bool | Dynamic sideSize depending on the browser's width and responsive breakpoints . Increments or decrements from max size 50% to min size 0% when expanding or narrowing the browser. |
false |