reactrondev / react-native-web-swiper

Swiper-Slider for React-Native and React-Native-Web
213 stars 56 forks source link

How to off Prev / Next buttons? #10

Closed gshoanganh closed 5 years ago

gshoanganh commented 5 years ago

Can I off buttons Prev / Next?

oxyii commented 5 years ago

@gshoanganh Yes. <Swiper buttonsEnabled={false}>

oxyii commented 5 years ago

@gshoanganh If you want to keep dots visible you can fake prev / next buttons text with spaces for now. Something like this <Swiper prevButtonText=" " nextButtonText=" ">. Or <Swiper prevButtonElement={<View/>} nextButtonElement={<View/>}>.

I'll review component props soon. "Dots only" can be possible with next major release

oxyii commented 5 years ago

I close this issue. @gshoanganh if it still actual please comment, I'll reopen

amit13091992 commented 3 years ago

These both solutions are not working on Android.

<Swiper prevButtonText=" " nextButtonText=" "> Or <Swiper prevButtonElement={<View/>} nextButtonElement={<View/>}>

amit13091992 commented 3 years ago

I used below property from library and it worked. THANK YOU.

controlsProps={{
    prevTitle: 'prev button title',
    nextTitle: 'next button title',
    dotsTouchable: true, {/* touch over dot will make swiper move to rel slide */}
    dotsPos: 'top',
    prevPos: false, {/* hide prev button */}
    nextPos: 'top-right',
    cellsStyle: {
      'top': { padding: 5, backgroundColor: 'rgba(0, 0, 0, .3)' },
      'top-left': { /* any custom placeholder style */ },
    },
    cellsContent: {
      'bottom-right': <AnyComponent /> {/* Additional content in placeholder */}
    }
  }}