React-native-snap-carousel: Change Pagination vertical margin

Created on 23 Jul 2018  Â·  6Comments  Â·  Source: meliorence/react-native-snap-carousel

Hi, I'm working with version 3.7.2.

How can I change Pagination vertical margin/padding? I tried setting values to containerStyle, dotContainerStyle and dotStyle… but nothing changes.

Most helpful comment

I'm surprised that changing containerStyle didn't have any effect for you in the first place because I've just tested the following and it works as expected:

<Pagination containerStyle={{ paddingVertical: 0 }} />

Or maybe you've indeed tried with paddingTop and paddingBottom, but not with paddingVertical ;-)

All 6 comments

Hi @matteoferigo,

Could you please provide a simple Snack example with your setup so I can take a look at it?

Hi @bd-arc , here is my sample: https://snack.expo.io/@matteoferigo/carousel-dots
I would like to reduce the edge between the carousel and the image below. How can I do that?

I'm surprised that changing containerStyle didn't have any effect for you in the first place because I've just tested the following and it works as expected:

<Pagination containerStyle={{ paddingVertical: 0 }} />

Or maybe you've indeed tried with paddingTop and paddingBottom, but not with paddingVertical ;-)

You got it. I tried with paddingTop and paddingBottom but I didn't find the paddingVertical reference.
I also found an interesting marginHorizontal to apply on dotContainerStyle.
Thanks

hi, bd-arc.
thank you.

It makes sense to not try marginHorizontal or paddingVertical since those don't exist in CSS.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SnowDang picture SnowDang  Â·  4Comments

Dr1992 picture Dr1992  Â·  4Comments

codejet picture codejet  Â·  5Comments

Murena7 picture Murena7  Â·  3Comments

siderakis picture siderakis  Â·  3Comments