Now In Code
Get access

Flip Panel Finish Line Button

Clicking a white pill flips a thick two-layer panel to a red back in 200 ms with a small bounce. A top-down race car enters with motion blur, passes Finish and a checkered line, and confetti bursts. Click again to rerun. Built from 24 pill slices.

Inspired by a design by @heysatya_ on XRebuilt from scratch by Now In Code

Agent prompt

Add the Now In Code component "flip-panel-finish-line-button" to this project.

The full source is attached at the end of this prompt. Put the files under components/flip-panel-finish-line-button/, 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 ===
Pro piece. The prompt includes the full source.Get access

Details

Platforms
iOS, Android, Web
Requires
Expo SDK 54+
Access
Pro
Updated
28 Oct 2026
License
Unlimited commercial projects
Original design
@heysatya_ on X

Are you the designer? Ask us to change or remove this.

CLI and MCP server Coming soon

Add pieces from the terminal or let your agent fetch them. Until then, Copy prompt does the same job. Docs

What it does

A wide white button with a checkered flag, a label and a red ball in a recessed well. Hovering or pressing flips it like a thick slab, and the red face comes up with a finish label in bold italic. The face overshoots in size by a couple of percent and settles. A race car then drives in from the left edge, eases toward a checkered finish line near the right, and a burst of seventy confetti pieces goes off as it crosses, with a trail behind. Moving the pointer away flips the button back to white while the confetti keeps falling. Pressing the red face again restarts only the car.

How it's built

A shared JavaScript core holds the timeline, the 3D transform matrices and the confetti physics. The slab is not a CSS 3D flip. It is stacked from twenty-four thin pill-shaped slices, each with a perspective-included 4 by 4 matrix computed in the core and painter-sorted by depth, because React Native has no preserve-3d. Confetti uses a seeded deterministic closed-form motion with damping and gravity. React Native draws everything with react-native-svg, Pressable and an image, advancing on requestAnimationFrame.

Good for

  • A celebratory submit or confirm button on a landing page or sports app
  • A hover or press reveal where a second face needs real thickness
  • A seeded, replayable confetti burst that is the same on web and native

Dependencies

react-native-svgreact-native

Tags

3D RotationButtonCompanion and WellbeingDark ModeFlipGames and EntertainmentIconBrand and MarketingMinimalParticlesSkeuomorphic 3DSpring PhysicsText Animation

Related