Isomorphic React Carousel Component.
npm install @ryo_suga/react-isomorphic-carousel* Isomorphic
* Responsive
* Touch and Swipe (is not draggable yet)
WIP: It is still under development.
sh
npm i @ryo_suga/react-isomorphic-carousel
`Usage
`tsx
import * as React from 'react';
import * as Carouse from '@ryo_suga/react-isomorphic-carousel';React.render(



,
document.getElementById('app')
);
`$3
#### Props
| name | type | description |
|-------------------|---------------------|-----------------------------------------------------------------------------------|
| useDots | boolean | use dots or not. (default false) |
| dotStyle | React.CSSProperties | custom css properties for dot button. (default {}) |
| activeDotStyle | React.CSSProperties | custom css properties for the active dot button. (default {}) |
| duration | number | miliseconds for animation speed. (default 500) |
| autoSlideInterval | number | miliseconds for auto slide. if 0 or less than 0, auto slide disabled. (default 0) |
#### Next/Prev Button
if you want to call next or prev to move slide position from script, use ref to get Carousel instance.
`tsx
class App extends React.Component {
carousel: Carousel
render() {
ref={(instance) => { this.carousel = instance; }}
>
{/ some element /}
onClick={() => {
// call prev
this.carousel && this.carousel.prev();
}}
>
prev
onClick={() => {
// call next
this.carousel && this.carousel.next();
}}
>
next
}
}
`Develop
`sh
npm start
`Test
`sh
npm test
``