React-native-snap-carousel: Change default pagination dot spacing

Created on 13 Jun 2019  路  5Comments  路  Source: meliorence/react-native-snap-carousel

How can I change the pagation dots spacing ?

Most helpful comment

I think the marginHorizontal is not on the dotStyle, but on the dotContainerStyle prop of Pagination (it refers to each container around each dot). So you can give a style with an given value of marginHorizontal to overwrite the default value

All 5 comments

It's mentioned in the pagination usage section:
https://github.com/archriss/react-native-snap-carousel/blob/master/doc/PAGINATION.md#note-on-dots-colors

Change the marginHorizantal field in the dotStyle from 8 to desired value

@l0h1t still not working.

I think the marginHorizontal is not on the dotStyle, but on the dotContainerStyle prop of Pagination (it refers to each container around each dot). So you can give a style with an given value of marginHorizontal to overwrite the default value

@voisinhugo your suggestion works correctly!

Hi
This is not working for me, the space is always the same between the dots. Any ideas ?
@nguyenhoanglam @voisinhugo

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sujitpk-perennial picture sujitpk-perennial  路  3Comments

niloufarMakhzani picture niloufarMakhzani  路  4Comments

AndrePech picture AndrePech  路  4Comments

amyogiji picture amyogiji  路  5Comments

naffiq picture naffiq  路  5Comments