https://github.com/kevva/deku-carousel
Carousel component for deku
https://github.com/kevva/deku-carousel
Last synced: 2 months ago
JSON representation
Carousel component for deku
- Host: GitHub
- URL: https://github.com/kevva/deku-carousel
- Owner: kevva
- License: mit
- Created: 2015-10-02T11:19:23.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-28T21:18:58.000Z (over 7 years ago)
- Last Synced: 2025-02-06T22:38:23.344Z (2 months ago)
- Language: JavaScript
- Homepage:
- Size: 14.6 KB
- Stars: 5
- Watchers: 5
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-deku - deku-carousel - Carousel component for deku (Components)
README
# deku-carousel
> Carousel component for deku
## Install
```
$ npm install deku-carousel
```## Usage
```js
import Carousel from 'deku-carousel';const render = () => (
);export default {render};
```## API
### <Carousel/>
#### arrows
Type: `boolean`
Default: `false`Whether to show navigation controls.
#### arrowNext
Type: `string` `Node`
Element to show for the next control.
#### arrowPrev
Type: `string` `Node`
Element to show for the previous control.
#### class
Type: `string`
Add classnames to the element.
#### duration
Type: `number`
Default: `300`Set the transition duration in milliseconds.
#### fastThreshold
Type: `number`
Default: `300`This is the amount of time in milliseconds which determines if a swipe was fast or not.
#### interval
Type: `number`
Default: `5000`Set the cycle interval.
#### onChange
Type: `Function`
Function to run when the a swipe occurs. Receives the current element and the `index` as arguments.
#### play
Type: `boolean`
Default: `false`Whether to play through the items automatically.
#### threshold
Type: `number`
Set the swipe threshold.
## License
MIT © [Kevin Mårtensson](https://github.com/kevva)