0

I am using this library - react-native-image-slider-box

I want to change my image size, now it's too big. How can I change it?

Any idea...

Here is my code:

<SliderBox
    images={list}
    sliderBoxHeight={300}
    autoplay
    circleLoop
    onCurrentImagePressed={(index) => {
        console.warn(`image ${index} pressed`);
    }}
/>

Thank you in advance!

wowandy
  • 1,124
  • 2
  • 10
  • 23

1 Answers1

0

You can change the image height inside the slider box using this property:

ImageComponentStyle={{height: '50%', width: '97%', marginTop: 5}}

This links to the below example (example 8)

Your final code will look like this:

<SliderBox
images={list}
sliderBoxHeight={300}
autoplay
circleLoop
onCurrentImagePressed={(index) => {
    console.warn(`image ${index} pressed`);
}}
ImageComponentStyle={{height: '50%', width: '97%', marginTop: 5}}
/>
Zach Jensz
  • 3,650
  • 5
  • 15
  • 30