<div class='sourceset sourceset-common'>Common</div>

```kotlin
object PullToRefreshDefaults
```

Contains the default values for [PullToRefreshBox](/jetpack-compose/androidx.compose.material3/material3/components/PullToRefreshBox)

## Properties

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Use indicatorShape instead

```kotlin
val shape: Shape
```

The default shape for `Indicator`

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val indicatorShape: Shape
```

The default shape for `Indicator`

<div class='sourceset sourceset-common'>Common</div>

> **Deprecated** Use indicatorContainerColor instead

```kotlin
val containerColor: Color
```

The default container color for `Indicator`

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val indicatorContainerColor: Color
```

The default container color for `Indicator`

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val loadingIndicatorContainerColor: Color
```

The default container color for the loading indicator that appears when pulling to refresh.

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val indicatorColor: Color
```

The default indicator color for `Indicator`

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val loadingIndicatorColor: Color
```

The default active indicator color for the loading indicator that appears when pulling to
refresh.

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val PositionalThreshold = 80.dp
```

The default refresh threshold for [rememberPullToRefreshState](/jetpack-compose/androidx.compose.material3/material3/composable-functions/rememberPullToRefreshState)

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val IndicatorMaxDistance = PositionalThreshold
```

The default maximum distance `Indicator`, `IndicatorBox` and [LoadingIndicator](/jetpack-compose/androidx.compose.material3/material3/components/LoadingIndicator) can be pulled
before a refresh is triggered.

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val Elevation = ElevationTokens.Level2
```

The default elevation for an `IndicatorBox` that is applied to an `Indicator`

<div class='sourceset sourceset-common'>Common</div>

```kotlin
val LoadingIndicatorElevation = ElevationTokens.Level0
```

The default elevation for an `IndicatorBox` that is applied to a [LoadingIndicator](/jetpack-compose/androidx.compose.material3/material3/components/LoadingIndicator)

## Functions

<h2 id="indicatorbox-state-isrefreshing-modifier-maxdistance-shape-containercolor-elevation-content">IndicatorBox</h2>

```kotlin
@Composable
    fun IndicatorBox(
        state: PullToRefreshState,
        isRefreshing: Boolean,
        modifier: Modifier = Modifier,
        maxDistance: Dp = IndicatorMaxDistance,
        shape: Shape = indicatorShape,
        containerColor: Color = Color.Unspecified,
        elevation: Dp = Elevation,
        content: @Composable BoxScope.() -> Unit,
    )
```

A Wrapper that handles the size, offset, clipping, shadow, and background drawing for a
pull-to-refresh indicator, useful when implementing custom indicators.
`PullToRefreshDefaults.Indicator` uses this as the container.

#### Parameters

| | |
| --- | --- |
| state | the state of this modifier, will use `state.distanceFraction` and `maxDistance` to calculate the offset |
| isRefreshing | whether a refresh is occurring |
| modifier | the modifier applied to this layout |
| maxDistance | the max distance the indicator can be pulled down before a refresh is triggered on release |
| shape | the [Shape](/jetpack-compose/androidx.compose.ui/ui-graphics/interfaces/Shape) of this indicator |
| containerColor | the container color of this indicator |
| elevation | the elevation for the indicator |
| content | content for this `IndicatorBox` |

<hr class="docs-overload-divider">

<h2 id="indicator-state-isrefreshing-modifier-containercolor-color-maxdistance">Indicator</h2>

```kotlin
@Composable
    fun Indicator(
        state: PullToRefreshState,
        isRefreshing: Boolean,
        modifier: Modifier = Modifier,
        containerColor: Color = this.indicatorContainerColor,
        color: Color = this.indicatorColor,
        maxDistance: Dp = IndicatorMaxDistance,
    )
```

The default indicator for [PullToRefreshBox](/jetpack-compose/androidx.compose.material3/material3/components/PullToRefreshBox).

#### Parameters

| | |
| --- | --- |
| state | the state of this modifier, will use `state.distanceFraction` and `maxDistance` to calculate the offset |
| isRefreshing | whether a refresh is occurring |
| modifier | the modifier applied to this layout |
| containerColor | the container color of this indicator |
| color | the color of this indicator |
| maxDistance | the max distance the indicator can be pulled down before a refresh is triggered on release |

<hr class="docs-overload-divider">

<h2 id="loadingindicator-state-isrefreshing-modifier-containercolor-color-elevation-maxdistance">LoadingIndicator</h2>

```kotlin
@Composable
    fun LoadingIndicator(
        state: PullToRefreshState,
        isRefreshing: Boolean,
        modifier: Modifier = Modifier,
        containerColor: Color = this.loadingIndicatorContainerColor,
        color: Color = this.loadingIndicatorColor,
        elevation: Dp = LoadingIndicatorElevation,
        maxDistance: Dp = IndicatorMaxDistance,
    )
```

A [LoadingIndicator](/jetpack-compose/androidx.compose.material3/material3/components/LoadingIndicator) indicator for [PullToRefreshBox](/jetpack-compose/androidx.compose.material3/material3/components/PullToRefreshBox).

#### Parameters

| | |
| --- | --- |
| state | the state of this modifier, will use `state.distanceFraction` and `maxDistance` to calculate the offset |
| isRefreshing | whether a refresh is occurring |
| modifier | the modifier applied to this layout |
| containerColor | the container color of this indicator |
| color | the color of this indicator |
| elevation | the elevation of this indicator |
| maxDistance | the max distance the indicator can be pulled down before a refresh is triggered on release |