State of Compose 2023 results are in! Click here to learn more

← Back to Material 3 Compose

PullToRefreshContainer

Component
in
Material 3
. Since 1.2.0-alpha11

Overview

Code Examples

Material Design pull-to-refresh indicator

A pull-to-refresh container contains a progress indicator to indicate a users drag progress towards triggering a refresh. On a refresh the progress indicator inside this container is indeterminate.

Overloads

PullToRefreshContainer

@Composable
@ExperimentalMaterial3Api
@Suppress("ComposableLambdaParameterPosition")
fun PullToRefreshContainer(
    state: PullToRefreshState,
    modifier: Modifier = Modifier,
    indicator: @Composable (PullToRefreshState) -> Unit = { pullRefreshState ->
        Indicator(state = pullRefreshState)
    },
    shape: Shape = PullToRefreshDefaults.shape,
    containerColor: Color = PullToRefreshDefaults.containerColor,
    contentColor: Color = PullToRefreshDefaults.contentColor,
)

Parameters

NameDescription
statethe state of this PullToRefreshContainer
modifierthe Modifier to be applied to this container
indicatorThe indicator placed inside of the PullToRefreshContainer. Has access to state
shapethe Shape of this container
containerColorthe color of this container
contentColorthe color of the progress indicato