# Jetpack Compose: Pull to Refresh

DevFeed: [Jetpack Compose: Pull to Refresh](<https://devfeed.tech/articles/jetpack-compose-pull-to-refresh-24851.md>)

Original publisher: [Read original article](<https://alexzh.com/jetpack-compose-pull-to-refresh/>)

Author: Alex Zhukovich

Published: 2023-06-16T09:50:46Z

Content type: tutorial

Language: en

Sources: [Alex Zhuk](<https://devfeed.tech/sources/alex-zhuk-android-development-and-testing.md>)

Topics: [Jetpack Compose](<https://devfeed.tech/topics/jetpack-compose.md>), [Test automation](<https://devfeed.tech/topics/test-automation.md>), [Software Testing](<https://devfeed.tech/topics/software-testing.md>), [User Interfaces](<https://devfeed.tech/topics/user-interfaces.md>), [User interface design](<https://devfeed.tech/topics/ui-design.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [background](<https://devfeed.tech/tags/background.md>), [colors](<https://devfeed.tech/tags/colors.md>), [compose](<https://devfeed.tech/tags/compose.md>), [customization](<https://devfeed.tech/tags/customization.md>), [experimental](<https://devfeed.tech/tags/experimental.md>), [jetpack](<https://devfeed.tech/tags/jetpack.md>), [jetpack-compose](<https://devfeed.tech/tags/jetpack-compose.md>), [material](<https://devfeed.tech/tags/material.md>), [refresh](<https://devfeed.tech/tags/refresh.md>), [scrollable](<https://devfeed.tech/tags/scrollable.md>), [semantic](<https://devfeed.tech/tags/semantic.md>), [state](<https://devfeed.tech/tags/state.md>), [testing](<https://devfeed.tech/tags/testing.md>), [tests](<https://devfeed.tech/tags/tests.md>), [ui](<https://devfeed.tech/tags/ui.md>), [ui-components](<https://devfeed.tech/tags/ui-components.md>), [user-interface](<https://devfeed.tech/tags/user-interface.md>)

## AI overview

Using the Material library from Compose BOM 2023.05.01, the excerpt describes adding pull-to-refresh with the `pullRefresh` modifier and `PullRefreshIndicator`, backed by a demo that adds list items after a delay. It covers configuring the refresh threshold and indicator offset, plus background and content colors, including different colors while refreshing. For UI tests, it recommends triggering the gesture with the scroll action on a scrollable semantics node; the excerpt begins a scenario where refreshing adds "Item 2" to a list initially showing "Item 1." The APIs are described as experimental.

## Source excerpt

This article covers adding and customizing the "Pull to Refresh" action in the Jetpack Compose. In addition to that, we will explore how to trigger pull to refresh action in UI tests.