SwiftUI.js
Components

Refreshable

Refreshable adapts SwiftUI's `.refreshable` modifier into an explicit web container with a refresh affordance and busy state.

Refreshable adapts SwiftUI's `.refreshable` modifier into an explicit web container with a refresh affordance and busy state.

Examples

Default

Preview unavailable for this example in the static docs build.

Show code
<Demo />

Variants

Preview unavailable for this example in the static docs build.

Show code
<Refreshable
      onRefresh={() => Promise.resolve()}
      toolbar={<Text>Updated just now</Text>}
    >
      <div style={{ padding: 16, border: '1px solid var(--sw-color-gray-4, #d1d5db)', borderRadius: 16 }}>
        Feed content
      </div>
    </Refreshable>

API

PropTypeRequiredDescription
onRefresh() => Promise<void> | voidYesNo description yet.
isRefreshingbooleanNoNo description yet.
refreshLabelstringNoNo description yet.
refreshingLabelstringNoNo description yet.
toolbarReactNodeNoNo description yet.

Inherits additional props from IBaseComponent.

Overview

Refreshable adapts SwiftUI's .refreshable modifier into an explicit web container with a refresh affordance and busy state.

On this page