An open API service indexing awesome lists of open source software.

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

Awesome Lists containing this project

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)