项目
在 GitHub 查看
Pau1fitz/react-slidez
关于
React Slideshow Component ➡️ ⬅️ ⬆️ ⬇️
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- 0
- 15天
- 0
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文React Slidez
✨ Customisable React Slideshow component.✨
Demo
💪 Live demo 💪
Installation
npm install react-slidez --save
Properties
| Property | Description | Type | Default |
|---|---|---|---|
| showIndex | Show the index of the current slide | Boolean | false |
| showArrows | Show arrows to navigate through the slides | Boolean | true |
| autoplay | Select whether you want the slideshow to autoplay or not | Boolean | true |
| enableKeyboard | Select whether you want to allow the user change the slides with the keyboard | Boolean | true |
| useDotIndex | Select whether you want the index to be dots or numbers | Boolean | false |
| slideInterval | Dictate the speed in ms at which the slides change | Integer | 2000 |
| defaultIndex | Choose the index that you wish to start at | Integer | 0 |
| slides | The slides you pass into the component. This can be an array of images, or other components which are passed as children. See example below. | Array | No default |
| effect | Choose the animation effect of your slideshow. Options include fade, left, top, right, bottom, bounce-right, bounce-left |
String | "fade" |
| height | Choose the height of the slideshow. Example height={'50px'} or height={'50%'} |
String | "100%" |
| width | Choose the width of the slideshow. Example width="50px" or width="50%" |
String | "100%" |
Usage
const Slideshow = require("react-slidez");
<Slideshow
showIndex
showArrows
autoplay
enableKeyboard
useDotIndex
slideInterval={2000}
defaultIndex={1}
slides={["1.jpg", "2.jpg"]}
effect="fade"
height="100%"
width="100%"
/>
You can also pass other components to the Slideshow component as children. All the same properties as above are available.
const Slideshow = require("react-slidez");
<Slideshow>
<ComponentOne />
<ComponentTwo />
<Checkout />
</Slideshow>
License
Copyright (c) 2017 Paul Fitzgerald
探索相关项目
加载中…