r/reactnative • u/TemporaryBuyer3806 Expo • 1d ago
Article Coin-to-percent paywall motion preview with React Native implementation notes
A paper plane takes off, leaving a coin that flips into a percent sign and lands on clouds.
This clip is a motion preview. Its capture framework is unverified. The notes below describe the React Native implementation.
The coin and percent sign share one signed-distance solid, ray-marched in a Skia shader. A morph value separates the rings, opens their holes and grows the diagonal bar. A smooth union joins the shapes during the change.
The plane and coin follow separate timed paths. The coin arcs and rotates while the clouds rise underneath. "No, thanks" starts a separate return sequence: the sign becomes a coin, the clouds sink and the plane comes back to catch it. The plane dips under the coin's weight before settling.
Plan selection moves one selection ring between the cards using a spring. Reanimated drives the motion values, Gesture Handler handles touch, and Skia draws the scene. The TypeGPU/WebGPU glitter layer is optional.
Built with React Native, Expo and TypeScript. Thanks to the Expo team (@expo).
Design reference: DonnyasPortfolio on Pinterest, recreated from a still: https://www.pinterest.com/pin/516225176060295531/ The motion was developed separately.
Disclosure: I make Native Cook. These notes were adapted from the block's source and build notes with an assistant.
Would you keep the animated return on "No, thanks", or dismiss the paywall immediately?
3
u/Western_Cap_6934 1d ago
I would dismiss immediately on No, thanks. The return animation can play while the underlying screen becomes usable, so declining does not add a wait. If the animation must finish first, I would save it for a voluntary replay instead.
1
u/TemporaryBuyer3806 Expo 1d ago
I working on https://nativecook.dev/