1.0.25 • Published 6 years ago
react-carousel-liron v1.0.25
React Carousel Liron
A responsive carousel for react that is very easy to use. Comes with a simple fading animation between slides. You can also have auto cycling between slides by adding some props.
Features
- Responsive
- Mobile friendly
- Custom auto play interval
- Stop play when mouse inside carousel and continue auto play when mouse outside the carousel
- Infinite loop
- Supports images , text content or anything you want.
- Each direct child represents one slide.
- Supports previuos/next
- Custom active slide
Installing as a package
npm i react-carousel-liron --save
Usage
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import Carousel from 'react-carousel-liron';
class DemoCarousel extends Component {
render() {
return (
<div className="container">
<Carousel>
<div>
<img src="assets/someimage1.jpg" />
<h1>some text 1</h1>
<p>some paragraph text 1</p>
</div>
<div>
<img src="assets/someimage2.jpg" />
<h1>some text 2</h1>
<p>some paragraph text 2</p>
</div>
</Carousel>
</div>
);
}
}
ReactDOM.render(<DemoCarousel />, document.querySelector('.demo-carousel'));
API
Carousel
import Carousel from 'react-carousel-liron'
Name | Type | Default | Description |
---|---|---|---|
timer | number | null | The amount of time to delay between automatically cycling an item. If null, carousel will not automatically cycle |
selectedIndex | number | 0 | Controls the current visible slide |
Demo
1.0.25
6 years ago
1.0.24
6 years ago
1.0.23
6 years ago
1.0.22
7 years ago
1.0.21
7 years ago
1.0.20
7 years ago
1.0.19
7 years ago
1.0.18
7 years ago
1.0.17
7 years ago
1.0.16
7 years ago
1.0.15
7 years ago
1.0.14
7 years ago
1.0.13
7 years ago
1.0.12
7 years ago
1.0.11
7 years ago
1.0.10
7 years ago
1.0.9
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.4
7 years ago
1.0.3
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago