Now In Code
Get access

Hold-to-Confirm Glow Fill Button

Holding the pill pulls a glow in from the left until it overexposes to white; after 2 seconds a check appears and sparks burst from the outline. One SkSL shader runs on WebGL and React Native Skia.

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

Agent prompt

Add the Now In Code component "hold-to-confirm-glow-fill-button" to this project.

The full source is attached at the end of this prompt. Put the files under components/hold-to-confirm-glow-fill-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.

=== Sign in to attach the source files ===

Details

Platforms
iOS, Android
Requires
Expo SDK 54+
Access
Free
Updated
8 Oct 2026
License
Unlimited commercial projects
Original design
@a_cucos 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

Two pill buttons, one that confirms and one that is destructive. Pressing and holding a pill shrinks it slightly and pulls a light in from the left edge. The glow brightens as it advances, small sparks drift along its leading edge, and the label blurs from "Hold to ..." into "Keep Holding...". After a two-second hold the pill turns white, shows a check and a past-tense label. The confirm button also throws particles outward from its outline; the destructive button deliberately does not. Releasing early pulls the glow back, and the button resets itself shortly after completing.

How it's built

The glow is one SkSL fragment shader, compiled as a Skia RuntimeEffect and drawn in a Skia canvas. A plain JavaScript core computes every frame from a log of press and release events, and the component maps that frame to views: the shader canvas, Skia circles for particles, and an SVG path for the check. Animation runs on a requestAnimationFrame loop, not Reanimated. React Native has no CSS blur, so the label blur is a sharp Text layered with a transparent Text that has a text shadow.

Good for

  • Confirming a destructive action such as deleting an account or a rule
  • Final commit steps like sending a payment or publishing, where a single tap is too easy
  • Switching on a setting the user should enable deliberately

Dependencies

@shopify/react-native-skiareact-native-svgexpo-hapticsreact-native

Tags

ButtonDark ModeGlowGradientLong PressNeon TechParticlesPress FeedbackProductivity and HabitsState TransitionSystem UIText Animation

Related