Licence
MIT
Version
0.0.7
Deps
5
Size
23 kB
Vulns
0
Weekly
0
react-js-carousel
React Carousel Component.
Getting Started
Installation
npm
npm install @alexcasche/react-carousel
yarn
yarn install @alexcasche/react-carousel
Props
| Name | Type | Default | Description |
|---|---|---|---|
| orientation | string | horizontal |
Set carousel direction (horizontal or vertical). |
| effect | string | slide |
Set carousel effect (slide or fade). |
| speed | number | 350 |
Set carousel transition speed (unit milliseconds). |
| wrap | boolean | true |
Set carousel wrap. |
| showControls | boolean | true |
Set carousel control visiblility. |
| showIndicators | boolean | true |
Set carousel indicators visiblility. |
Example
import React, { Component } from 'react';
import Carousel from 'react-carousel';
import 'react-carousel/style.css';
class SimpleExmample extends Component {
render() {
var options = {
speed: 400,
wrap: false,
showIndicators: false
};
return (
<Carousel {...options} >
<div>First Slide</div>
<div>Second Slide</div>
</Carousel>
)
}
}