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
| Prop | Type | Required | Description |
|---|---|---|---|
onRefresh | () => Promise<void> | void | Yes | No description yet. |
isRefreshing | boolean | No | No description yet. |
refreshLabel | string | No | No description yet. |
refreshingLabel | string | No | No description yet. |
toolbar | ReactNode | No | No 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.
Redacted
Redacted adapts SwiftUI's `redacted` modifier into an explicit placeholder or privacy wrapper on the web.
SafeArea
SafeArea is a view that insets its content to respect safe area boundaries. SafeArea ensures content is not obscured by system UI elements like notches, status bars, and home indicators.