Now In Code
Get access

Shader Glow Glass Pill Button

A dark pill holds drifting blurred glows, a bright top edge, warm inner light at the bottom, an eight-armed star icon and white text. One shader draws it analytically; glows follow the pointer on hover and it shrinks on press. WebGL and Skia share the source.

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

Agent prompt

Add the Now In Code component "shader-glow-glass-pill-button" to this project.

The full source is attached at the end of this prompt. Put the files under components/shader-glow-glass-pill-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
20 Nov 2026
License
Unlimited commercial projects
Original design
@coleHardik 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 dark pill button labelled with a short call to action, an eight-armed star icon on the left and white text on the right. Inside the pill, blurred blue-violet light blobs drift, with a thin bright rim along the top edge and a warm pink-orange inner glow along the bottom. A second silver-grey colorway is available through a variant prop. Moving a pointer across it pulls the light blobs sideways and brightens the glass slightly, and pressing shrinks the button a few percent. At rest the button matches the still reference image.

How it's built

The entire button face, meaning the glass base, light blobs, inner shadows, outline and the star with its soft drop shadow, is drawn by a single SkSL fragment shader compiled as a Skia RuntimeEffect inside a Skia canvas. The label is a regular React Native Text laid over it, using a bundled font loaded with expo-font. A plain JavaScript core supplies the shader source and an exponential-approach step for the hover and press values, advanced on a requestAnimationFrame loop. The web preview runs the same shader body through WebGL.

Good for

  • A primary call-to-action on a dark landing screen or hero section
  • A highlight button for a premium or AI feature entry point
  • A reference for drawing icons and soft lighting entirely inside a shader

Dependencies

@shopify/react-native-skiaexpo-fontreact-native

Tags

ButtonCursor FollowDark ModeGlowGradientIconLiquid GlassPress FeedbackShaderSkeuomorphic 3D

Related