Carousel component for deku
$ npm install deku-carousel
import Carousel from 'deku-carousel';
const render = () => (
<Carousel play arrows arrowPrev='Previous' arrowNext='Next'>
<div><img src='cat.jpg' alt=''/></div>
<div><img src='unicorn.jpg' alt=''/></div>
</Carousel>
);
export default {render};
Type: boolean
Default: false
Whether to show navigation controls.
Type: string
Node
Element to show for the next control.
Type: string
Node
Element to show for the previous control.
Type: string
Add classnames to the element.
Type: number
Default: 300
Set the transition duration in milliseconds.
Type: number
Default: 300
This is the amount of time in milliseconds which determines if a swipe was fast or not.
Type: number
Default: 5000
Set the cycle interval.
Type: Function
Function to run when the a swipe occurs. Receives the current element and the index
as arguments.
Type: boolean
Default: false
Whether to play through the items automatically.
Type: number
Set the swipe threshold.
MIT © Kevin Mårtensson