1.0.3 • Published 10 months ago
slider-moon v1.0.3
Slider Moon
A slide plugin for react. The main focus was to build an accessible, high-performance and easy-to-install plugin. Feel free to explore and evolve my plugin. See the examples here
Install
$ npm i slider-moon
or
$ yarn add slider-moon
How to use
import the function Slider
and css in your component.
import Slider from 'slider-moon';
import 'slider-moon/dist/style.css'
<Slider
slideClass={'my-slider'}
infinite={true}
bullets={true}
arrowsNav={true}
animation={'scale'}
callback={() => {
console.log('here');
}}
>
<div className='slider my-slider'>
<ul className='slider-wrapper'>
{items.map((item) => (
<li key={item}>
<img src={yourImage} />
</li>
))}
</ul>
</div>
</Slider>
Options
options can be passed as props to the Slider
component. See below for the options and their description.
Contributing
If you have a pull request that you would like to submit, be sure to update the library version. Feel free to help and evolve the plugin.
License
The code is available under the MIT License.