PullToRefresh
A ScrollView wired to a themed RefreshControl so pulling down triggers a refresh, with a tint that defaults to the primary action color on both platforms.
PullToRefresh is a ScrollView preconfigured with a themed RefreshControl. Pulling the content down shows the platform spinner and calls onRefresh; you drive the spinner's visibility with the refreshing flag. The tint applies on both iOS and Android.
Import
import { PullToRefresh } from '@mindees/ui';
Usage
<PullToRefresh refreshing={loading} onRefresh={reload}>
<Feed items={items} />
</PullToRefresh>
Props
| Prop | Type | Default | Description |
|---|---|---|---|
refreshing | boolean | — | Whether the refresh spinner is shown. |
onRefresh | () => void | — | Called when the user pulls past the refresh threshold. |
tintColor | string | colors.action.primary | Spinner tint, applied via tintColor (iOS) and colors (Android). |
children | ReactNode | — | Scrollable content. |
style | StyleProp<ViewStyle> | — | Style applied to the ScrollView. |
All other ScrollView props (except refreshControl) are accepted and forwarded.
Accessibility
The ScrollView itself uses accessibilityRole="none"; the refresh affordance is the platform RefreshControl, which screen readers announce natively. Always provide an alternative refresh path for users who cannot perform the pull gesture.
SwipeableCard
A Card that can be swiped away to dismiss, fading as it moves and firing onDismiss once it passes a configurable fraction of the screen width.
InfiniteScroll
A generic FlatList that calls onLoadMore as the list nears its end, showing a footer spinner while loading and guarding against duplicate end events.