public object GlimmerHorizontalPagerDefaults
Default values and helper methods to be used with the GlimmerHorizontalPager.
Properties
UnselectedIndicatorAlpha
public val UnselectedIndicatorAlpha: Float
The alpha that is applied to the selected page indicator dot color, to color the remaining (unselected) page indicator dots
Functions
PageIndicator
@Composable
public fun PageIndicator(state: GlimmerPagerState, modifier: Modifier = Modifier)
A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style
The color of the dot indicating the currently selected page is extracted by retrieving the content color from the nearest surface, while the remaining dots are the content color with an alpha of UnselectedIndicatorAlpha applied. To provide custom colors, see the overload of PageIndicator with additional color parameters
Parameters
| state | state object to be used to observe the Pager's state |
| modifier | modifier to be applied to the page indicator |
PageIndicator
@Composable
public fun PageIndicator(
state: GlimmerPagerState,
selectedIndicatorColor: Color,
unselectedIndicatorColor: Color,
modifier: Modifier = Modifier,
)
A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style
This version of the indicator supports passing in a selectedIndicatorColor to color the dot representing the currently selected page, while the remaining dots are colored with unselectedIndicatorColor
Parameters
| state | state object to be used to observe the Pager's state |
| selectedIndicatorColor | color of the selected page indicator dot |
| unselectedIndicatorColor | color of the unselected page indicator dots. This value should typically be the selectedIndicatorColor with the alpha UnselectedIndicatorAlpha applied |
| modifier | modifier to be applied to the page indicator |