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

← Back to Material Compose

PullRefreshIndicator

Component
in
Material
. Since 1.3.0

Overview

Code Examples

The default indicator for Compose pull-to-refresh, based on Android's SwipeRefreshLayout.

Overloads

PullRefreshIndicator

@Composable
@ExperimentalMaterialApi
//  enable people to use this indicator with custom pull-to-refresh components.
fun PullRefreshIndicator(
    refreshing: Boolean,
    state: PullRefreshState,
    modifier: Modifier = Modifier,
    backgroundColor: Color = MaterialTheme.colors.surface,
    contentColor: Color = contentColorFor(backgroundColor),
    scale: Boolean = false
)

Parameters

NameDescription
refreshingA boolean representing whether a refresh is occurring.
stateThe PullRefreshState which controls where and how the indicator will be drawn.
modifierModifiers for the indicator.
backgroundColorThe color of the indicator's background.
contentColorThe color of the indicator's arc and arrow.
scaleA boolean controlling whether the indicator's size scales with pull progress or not