Morphing Pull-to-Refresh Indicator
A replayed pull gesture slides a feed down as a gradient banner opens under the header. A ring arc sweeps with pull distance, a face's mouth grows from a dot to a smile, then the smile morphs into a check and the banner closes. Plain React Native views.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "morphing-pull-to-refresh-indicator" to this project. The full source is attached at the end of this prompt. Put the files under components/morphing-pull-to-refresh-indicator/, install the listed dependencies with `npx expo install`, and render it on a route I can open. Keep the timing and easing values documented in the source comments. Replace the sample copy and artwork with content from my app, or leave placeholders and list what I still need to supply. === Source files are attached here for paid plans ===
Details
- Platforms
- iOS, Android
- Requires
- Expo SDK 54+
- Access
- Pro
- Updated
- 22 Sep 2026
- License
- Unlimited commercial projects
- Original design
- X
Are you the designer? Ask us to change or remove this.
Add pieces from the terminal or let your agent fetch them. Until then, Copy prompt does the same job. Docs
What it does
A dark feed screen with a header, a question card, a sleep card and a bottom tab bar. Dragging the content down pulls a banner open above it, and the whole page moves down with the banner. Inside the banner a round icon follows the pull, drifting slightly lower as it opens. A dim ring track appears first, then a bright arc sweeps clockwise from twelve o'clock to a full circle as the pull reaches its threshold, while a mouth grows from a dot into a smile. On release the banner holds at a fixed height, the smile morphs into a check mark with a short smear, and the banner slides closed as content settles. The loop repeats.
How it's built
A shared pure JavaScript module turns time into banner height, icon position, ring sweep and the shape points for the smile-to-check morph. The drag, release and close curves are stored as measured keyframe tables, and the ring and mouth are driven by the pull distance rather than by time. The component uses only React Native views and Image, with PNG icons rasterized from code-drawn SVG, and advances on a requestAnimationFrame loop. There is a frozen-time prop for tests. No gesture or animation library appears in the imports.
Good for
- A custom pull-to-refresh header in a feed or inbox
- A loading indicator whose progress is tied to drag distance
- A success confirmation that morphs one glyph into another
Dependencies
react-native