GlimmerHorizontalPagerDefaults

object GlimmerHorizontalPagerDefaults


Default values and helper methods to be used with the GlimmerHorizontalPager.

Summary

Public functions

Unit

A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style

Unit
@Composable
PageIndicator(
    state: GlimmerPagerState,
    selectedIndicatorColor: Color,
    unselectedIndicatorColor: Color,
    modifier: Modifier
)

A page indicator for a GlimmerHorizontalPager, representing the currently active page and total pages using a dot-based visual style

Public properties

Float

The alpha that is applied to the selected page indicator dot color, to color the remaining (unselected) page indicator dots

Public functions

PageIndicator

Added in 1.0.0-alpha16
@Composable
fun PageIndicator(state: GlimmerPagerState, modifier: Modifier = Modifier): Unit

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: GlimmerPagerState

state object to be used to observe the Pager's state

modifier: Modifier = Modifier

modifier to be applied to the page indicator

PageIndicator

Added in 1.0.0-alpha16
@Composable
fun PageIndicator(
    state: GlimmerPagerState,
    selectedIndicatorColor: Color,
    unselectedIndicatorColor: Color,
    modifier: Modifier = Modifier
): Unit

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: GlimmerPagerState

state object to be used to observe the Pager's state

selectedIndicatorColor: Color

color of the selected page indicator dot

unselectedIndicatorColor: Color

color of the unselected page indicator dots. This value should typically be the selectedIndicatorColor with the alpha UnselectedIndicatorAlpha applied

modifier: Modifier = Modifier

modifier to be applied to the page indicator

Public properties

UnselectedIndicatorAlpha

Added in 1.0.0-alpha16
val UnselectedIndicatorAlphaFloat

The alpha that is applied to the selected page indicator dot color, to color the remaining (unselected) page indicator dots