1.1.5 • Published 6 years ago

react-easy-carousel v1.1.5

Weekly downloads
2
License
MIT
Repository
github
Last release
6 years ago

react-easy-carousel

A no-configuration no-CSS React carousel.

Installation

With npm:

npm install --save react-easy-carousel

Or with Yarn:

yarn add react-easy-carousel

Usage

import Carousel from 'react-easy-carousel'

...

<Carousel animation='slide' dots>
	<img src='http://via.placeholder.com/600x400?text=First' />
	<img src='http://via.placeholder.com/600x400?text=Second' />
	<img src='http://via.placeholder.com/600x400?text=Third' />
</Carousel>

Or if you need custom controls, like thumbnails:

import Carousel from 'react-easy-carousel'

...

<Carousel
   animation='slide'
   buttons={slideNumber => <img src={`/thumbnail-${slideNumber}.jpg`} />}
   >
	<img src='http://via.placeholder.com/600x400?text=First' />
	<img src='http://via.placeholder.com/600x400?text=Second' />
	<img src='http://via.placeholder.com/600x400?text=Third' />
</Carousel>

Options

PropertyDescriptionDefault
activeThe current visible slide0
autoThe number of milliseconds until the active slide automatically changes7000
animationThe animation style of the slide change ("slide" or "fade")"slide"
animationDurationThe duration of the transition animation in milliseconds300
backgroundThe slide default background color"#fff"
dotsShows control buttons at the bottom of the carouselfalse
dotColorThe color of the dot controls"#666"
dotActiveColorThe color of the active dot button"#000"
dotSizeThe dot size in pixels12
buttonsPass in a function to create custom control buttonsn/a
1.1.5

6 years ago

1.1.4

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.0.2

6 years ago

1.0.0

6 years ago