PageControl
Page indicator, typically used in paged scroll-views
(code example)
Usageβ
<PageControl numOfPages={5} currentPage={0}/>
APIβ
colorβ
Color of the selected page dot and, if inactiveColor not passed, the border of the not selected pages
string
containerStyleβ
Additional styles for the top container
ViewStyle
currentPageβ
Zero-based index of the current page
number
enlargeActiveβ
Whether to enlarge the active page indicator. Irrelevant when limitShownPages is in effect.
boolean
inactiveColorβ
Color of the unselected page dots and the border of the not selected pages
string
limitShownPagesβ
Limit the number of page indicators shown.\enlargeActive prop is disabled in this state, when set to true there will be maximum of 7 shown.\Only relevant when numOfPages > 5.
boolean
numOfPagesβ
Total number of pages
number
onPagePressβ
Action handler for clicking on a page indicator
(index: number) => void
sizeβ
The size of the page indicator.\When setting limitShownPages the medium sized will be 2/3 of size and the small will be 1/3 of size.\An alternative is to send an array [smallSize, mediumSize, largeSize].
number | [number, number, number]
spacingβ
The space between the siblings page indicators
number
testIDβ
Used to identify the pageControl in tests
string