1.0.19 • Published 4 years ago
react-pretty-carousel v1.0.19
React-Pretty-Carousel
Easily add beautiful carousels to your website in no time!
Check out the Demo on the docs website!
Installation
In order to install react-pretty-carousel
, run this command in your terminal.
npm i react-pretty-carousel --save
Or
yarn add react-pretty-carousel
Usage
Props
Prop | DataType | Description |
---|---|---|
items | integer | Number of items to display at once |
mode | string | Style of the carousel, can be either normal or gallery |
showControls | boolean | Show the dots and navigation buttons if true , and otherwise if false |
External Functions and Values
You can summon and move/navigate through the carousel by importing and using the following functions:
import {
CarouselWrapper,
prev,
next,
moveTo,
switchTo,
presentIndex,
} from "react-pretty-carousel";
Function | Description | Parameters |
---|---|---|
prev() | Move to the previous slide | none |
next() | Move to the next slide | none |
moveTo(5) | Move to a certain index/object with smooth animation | integer |
switchTo(5) | Abruptly move to a certain index/object | integer |
presentIndex | Get the present index of the carousel object being displayed | none |
1.0.19
4 years ago
1.0.18
4 years ago
1.0.17
4 years ago
1.0.16
4 years ago
1.0.15
4 years ago
1.0.14
4 years ago
1.0.13
4 years ago
1.0.12
4 years ago
1.0.11
4 years ago
1.0.10
4 years ago
1.0.9
4 years ago
1.0.8
4 years ago
1.0.7
4 years ago
1.0.6
4 years ago
1.0.5
4 years ago
1.0.4
4 years ago
1.0.3
4 years ago
1.0.2
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago