VerticalPagerIndicator

fun VerticalPagerIndicator(pagerState: PagerState, pageCount: Int, modifier: Modifier = Modifier, pageIndexMapping: (Int) -> Int = { it }, activeColor: Color = LocalContentColor.current.copy(alpha = LocalContentAlpha.current), inactiveColor: Color = activeColor.copy(ContentAlpha.disabled), indicatorHeight: Dp = 8.dp, indicatorWidth: Dp = indicatorHeight, spacing: Dp = indicatorHeight, indicatorShape: Shape = CircleShape)(source)

A vertically laid out indicator for a androidx.compose.foundation.pager.VerticalPager or androidx.compose.foundation.pager.HorizontalPager, representing the currently active page and total pages drawn using a Shape.

This element allows the setting of the indicatorShape, which defines how the indicator is visually represented.

Parameters

modifier

the modifier to apply to this layout.

pageCount

the size of indicators should be displayed. If you are implementing a looping pager with a much larger pageCount than indicators should displayed, e.g. Int.MAX_VALUE, specify you real size in this param.

pageIndexMapping

describe how to get the position of active indicator by the giving page from androidx.compose.foundation.pager.PagerState.currentPage.

activeColor

the color of the active Page indicator

inactiveColor

the color of page indicators that are inactive. This defaults to activeColor with the alpha component set to the ContentAlpha.disabled.

indicatorHeight

the height of each indicator in Dp.

indicatorWidth

the width of each indicator in Dp. Defaults to indicatorHeight.

spacing

the spacing between each indicator in Dp.

indicatorShape

the shape representing each indicator. This defaults to CircleShape.