AnimatedPage

Composable Component

Animates a page within a Pager with a scaling and scrim effect based on its position.

Android
@Composable
public fun AnimatedPage(
    pageIndex: Int,
    pagerState: PagerState,
    contentScrimColor: Color = MaterialTheme.colorScheme.background,
    content: @Composable (() -> Unit),
)

Parameters

pageIndexThe index of the page being animated.
pagerStateThe PagerState of the Pager.
contentScrimColorThe color of the scrim overlay applied during page transitions. Defaults to the background color of the MaterialTheme. Set this to transparent to have no scrim applied during page transitions.
contentThe composable content of the page.

Create your own Component Library

Material Components are meant to be used as is and they do not allow customizations. To build your own Jetpack Compose component library use Compose Unstyled