Compose Component

ScrollIndicator

A composable that displays a visual indicator of scrolling progress within a scrollable container.

ScrollIndicator social preview

ScrollIndicatorWithTLCSample

@Sampled
@Preview
@Composable
fun ScrollIndicatorWithTLCSample() {
    val scrollState = rememberTransformingLazyColumnState()
    Box(modifier = Modifier.fillMaxSize()) {
        TransformingLazyColumn(
            modifier = Modifier.background(Color.Black),
            state = scrollState,
            contentPadding = ScreenScaffoldDefaults.contentPadding,
        ) {
            items(15) {
                Button(
                    onClick = {},
                    label = { Text("Button $it") },
                    modifier =
                        Modifier.minimumVerticalContentPadding(
                                ButtonDefaults.minimumVerticalListContentPadding
                            )
                            .fillMaxWidth(),
                )
            }
        }
        ScrollIndicator(modifier = Modifier.align(Alignment.CenterEnd), state = scrollState)
        TimeText()
    }
}
Jetpack Compose beyond MaterialFree components, screens and templates for apps that don’t look like Google’s. Copy them into your app, or let your coding agent add them.Browse for free

Content updated: