1.1.2 • Published 8 months ago
reactjs-simple-slider v1.1.2
React Simple Image Slider
A simple and reusable image slider for React (Demo)
Installation
The package can be installed via NPM:
npm i reactjs-simple-slider
Usage
Import Slider for usage :
import { Slider } from "reactjs-simple-slider";
Define your slider and config :
<Slider
objectFit="contain"
images={[
"https://fakeimg.pl/200x50/",
"https://fakeimg.pl/200x50/ff0000/",
"https://fakeimg.pl/200x50/0000ff/",
]}
/>
User guide
Prop name | Description | Default value | Example values |
---|---|---|---|
width | Width of slider | 200px | |
height | Height of slider | 500px | |
objectFit | The objectFit property is used to specify how an images should be resized to fit its container | undefined | fill , contain , cover , none , scale-down , undefined |
images | List of images to show | string[] | {"image1", "image2", "image3"} |
leftArrow | You can customize arrow left by pass string or a react component or function | React Component or string | |
rightArrow | You can customize arrow right by pass string or a react component or function | React Component or string | |
infiniteLoop | Set auto change slide | false | true , false |
interval | Duration of change images slider time | 5000 | Millisecond |
1.1.2
8 months ago
1.1.1
9 months ago
1.1.0
9 months ago
1.0.33
9 months ago
1.0.32
9 months ago
1.0.31
9 months ago
1.0.30
9 months ago
1.0.29
9 months ago
1.0.28
9 months ago
1.0.27
9 months ago
1.0.26
9 months ago
1.0.25
9 months ago
1.0.24
9 months ago
1.0.23
9 months ago
1.0.22
9 months ago
1.0.21
9 months ago
1.0.20
9 months ago
1.0.13
9 months ago
1.0.12
9 months ago
1.0.11
9 months ago
1.0.10
9 months ago
1.0.9
9 months ago
1.0.8
9 months ago
1.0.7
9 months ago
1.0.6
9 months ago
1.0.5
9 months ago
1.0.4
9 months ago
1.0.3
9 months ago
1.0.2
9 months ago
1.0.1
9 months ago
1.0.0
9 months ago