tiny-slider-react
Original plugin tiny-slider
props
prop | decription |
---|---|
settings | options slider |
onClick | callback to return slide clicked (slideClicked, info, event) |
startIndex | index of carousel initiation |
onIndexChanged | event bind |
onTransitionStart | event bind |
onTransitionEnd | event bind |
onTouchStart | event bind |
onTouchMove | event bind |
onTouchEnd | event bind |
; const settings = lazyload: true nav: false mouseDrag: true; <TinySlider settings=settings> imgs</TinySlider>
How to use external buttons for prev & next
const settings = lazyload: true nav: false mouseDrag: true controls: false // remove built-in nav buttons
Get the slider from refs:
<TinySlider settings=settings ref= thists = ts>...</TinySlider>
Add onClick for your buttons:
<button type="button" onClick= this>Previous</button><button type="button" onClick= this>Next</button>
Add the handler on your component:
thistsslider