kyya / react-slidebox

:cake: Another React Slidebox

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

react-slidebox

Another React Slidebox

npm npm npm

React Slide Box @Demos

Props

  • duration: Picture switching time
  • banners: Large pictures, recommends 5
  • thumbs: Small pictures, recommends 5

example:

const props = {
    duration: 2000,
    banners: [
        'https://i.loli.net/2018/10/26/5bd3109e4e7f9.jpg',
        'https://i.loli.net/2018/10/26/5bd3109f390aa.jpg',
        'https://i.loli.net/2018/10/26/5bd3109f43a00.jpg',
        'https://i.loli.net/2018/10/26/5bd310a0c47c0.jpg',
        'https://i.loli.net/2018/10/26/5bd310a16546d.jpg'
    ],
    thumbs: [
        'https://i.loli.net/2018/10/26/5bd310f62e777.jpg',
        'https://i.loli.net/2018/10/26/5bd310f64c03b.jpg',
        'https://i.loli.net/2018/10/26/5bd310f6c653d.jpg',
        'https://i.loli.net/2018/10/26/5bd310f78c4f8.jpg',
        'https://i.loli.net/2018/10/26/5bd310f8a7753.jpg'
    ]
}

How to Use

yarn add react-slidebox or npm install react-slidebox

// For ES6
import 'react-slidebox/dist/react-slidebox.css'
import ReactSlideBox from 'react-slidebox'

//Then use <ReactSlideBox {...props} /> like Other React Component

Build

npm run build or yarn build

License

MIT

About

:cake: Another React Slidebox


Languages

Language:JavaScript 72.7%Language:CSS 23.2%Language:HTML 4.0%