react-native-app-intro-slider
react-native-app-intro-slider copied to clipboard
How to hide pagination dots
I have lots of screen and I want to hide pagination dots at the bottom because it renders too many dots . How can I hide them ?
@binhchili - As mentioned in the releases:
paginationStyle and hidePagination props have been removed and a new renderPagination-function takes their place. To disable any pagination/buttons/everything give it a function that returns null.
This is how I managed to remove them
<AppIntroSlider
...
renderPagination={() => null}
/>
render pagnation removed my slides
how to fix it
i want to hide these dots on last page how i can hide it
If renderPagination
is set to null
, the next button, etc. will also disappear.
In my case, I wanted to remove the dots while keeping the buttons, so I'll share how I did it.
<AppIntroSlider
...
dotStyle={{
display: "none",
}}
/>
Or you could do it by making renderPagination
a custom button as shown in this issue.
If you want to remove the dot on the last slide, I think you can get the index with onSlideChange
and render the custom button set in renderPagination
with a conditional branch.
I don't know, I haven't actually done this 😅.