# PullRefreshState

# PullRefreshState

Artifact:[androidx.compose.material:material](https://developer.android.com/jetpack/androidx/releases/compose-material)  
[View Source](https://cs.android.com/search?q=file:androidx/compose/material/pullrefresh/PullRefreshState.kt+class:androidx.compose.material.pullrefresh.PullRefreshState)  
Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.3.0)
Common/All
  - Cmn  

  ```
  @ExperimentalMaterialApi
  class PullRefreshState
  ```

*** ** * ** ***

A state object that can be used in conjunction with[pullRefresh](https://developer.android.com/reference/kotlin/androidx/compose/material/pullrefresh/package-summary#(androidx.compose.ui.Modifier).pullRefresh(androidx.compose.material.pullrefresh.PullRefreshState,kotlin.Boolean))to add pull-to-refresh behaviour to a scroll component. Based on Android's SwipeRefreshLayout.

Provides[progress](https://developer.android.com/reference/kotlin/androidx/compose/material/pullrefresh/PullRefreshState#progress()), a float representing how far the user has pulled as a percentage of the refreshThreshold. Values of one or less indicate that the user has not yet pulled past the threshold. Values greater than one indicate how far past the threshold the user has pulled.

Can be used in conjunction with[pullRefreshIndicatorTransform](https://developer.android.com/reference/kotlin/androidx/compose/material/pullrefresh/package-summary#(androidx.compose.ui.Modifier).pullRefreshIndicatorTransform(androidx.compose.material.pullrefresh.PullRefreshState,kotlin.Boolean))to implement Android-like pull-to-refresh behaviour with a custom indicator.

Should be created using[rememberPullRefreshState](https://developer.android.com/reference/kotlin/androidx/compose/material/pullrefresh/package-summary#rememberPullRefreshState(kotlin.Boolean,kotlin.Function0,androidx.compose.ui.unit.Dp,androidx.compose.ui.unit.Dp)).

## Summary

|                              ### Public properties                              |
|---------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----|
| [Float](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html) | [progress](https://developer.android.com/reference/kotlin/androidx/compose/material/pullrefresh/PullRefreshState#progress()) A float representing how far the user has pulled as a percentage of the refreshThreshold. | Cmn |

## Public properties

### progress

Cmn  
Added in[1.3.0](https://developer.android.com/jetpack/androidx/releases/compose-material#1.3.0)  

```
val progress: Float
```

A float representing how far the user has pulled as a percentage of the refreshThreshold.

If the component has not been pulled at all, progress is zero. If the pull has reached halfway to the threshold, progress is 0.5f. A value greater than 1 indicates that pull has gone beyond the refreshThreshold - e.g. a value of 2f indicates that the user has pulled to two times the refreshThreshold.