Jacse / react-native-app-intro-slider

Simple and configurable app introduction slider for react native
MIT License
1.65k stars 330 forks source link

How to hide pagination dots #226

Open binhchili opened 3 years ago

binhchili commented 3 years ago

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 ?

sasindroid commented 3 years ago

@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.

PatrickNiyogitare28 commented 3 years ago

This is how I managed to remove them

 <AppIntroSlider
           ...
          renderPagination={() => null}
 />
BharathiNB commented 2 years ago

render pagnation removed my slides
how to fix it

ryuji-orca commented 11 months ago

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 😅.