Avatar Wheel Draw with Winner Flight
Pressing the draw button spins an avatar wheel for two uneven turns with a motion-blur trail until it lands on a winner. The others fade, the page blurs, and the winner's avatar arcs into a turn card while a ranked list blurs in row by row.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "avatar-wheel-draw-with-winner-flight" to this project. The full source is attached at the end of this prompt. Put the files under components/avatar-wheel-draw-with-winner-flight/, 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
- 9 Oct 2026
- License
- Unlimited commercial projects
- Original design
- @EmaniUi on 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 group-savings draw screen in two pages. On the first, a ring of member avatars appears one by one clockwise around a central shuffle button, with a title and a start button below. Pressing the button spins the ring through two full turns, fast in the middle with a motion blur, and then stops. Every avatar except the winner dims, the winner grows slightly and two thin rings pulse outward from it. The page blurs and gathers away while the winner's avatar arcs up and across into a card on the second page. There the heading, card, verification row and share button blur in one after another, a list of dated rows cascades in, and the page scrolls down and back up. The share button has a pressed state.
How it's built
One shared JavaScript timeline function returns every element's position, opacity, blur and scale for a time on a clock measured in seconds. The wheel's angle comes from a table of measured cumulative angles joined with monotone cubic interpolation, and the winner's flight path is also stored as a table. The React Native component runs a Date-based clock in an effect and renders the frame with views, Pressable, a ScrollView and react-native-svg. A progressive blur band is an expo-blur view revealed through a gradient mask from the masked-view package. There is a demo mode that loops and an interactive mode, and the text uses a font from an Expo font package.
Good for
- Random selection moments such as drawing a winner, a turn order or a payout slot
- Group finance and savings apps that reveal who is next
- A transition that carries one avatar from a list or wheel into a detail card
Dependencies
@expo-google-fonts/inter-tight@react-native-masked-view/masked-viewexpo-blurreact-native-svgreact-native