Now In Code
Get access

Plasma Lens Sweep Theme Toggle Transition

Switching light to dark raises a pink and violet plasma pool, then a crescent lens band sweeps upward, stretching text with RGB fringes and pushing content aside. A soft dark curtain rises and dark content sharpens from the top. Dark to light plays backwards.

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

Agent prompt

Add the Now In Code component "plasma-lens-sweep-theme-toggle-transition" to this project.

The full source is attached at the end of this prompt. Put the files under components/plasma-lens-sweep-theme-toggle-transition/, 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
Requires
Expo SDK 54+
Access
Pro
Updated
18 Nov 2026
License
Unlimited commercial projects
Original design
@saintdsgn 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 web-style page with a pill labelled EDIT SHADER, a sun button, two justified paragraphs and a BUTTON. Pressing the button or the sun flips between light and dark themes with a single full-page shader effect. Going dark, a pool of plasma color gathers at the bottom, then a crescent lens band travels up the page. At its front the content is stretched vertically, pushed away and split into red and blue edges, and behind it is a blurred pink-violet area with white bokeh. A soft dark curtain then rises and the dark page sharpens in from the top. Going light plays the reverse, ending with the lower color pool dissolving.

How it's built

The page is rasterized into a Skia offscreen surface and a fragment shader, written in SkSL, is applied to it as a runtime effect with children. A shared core holds the timing, the shader body and a set of multipliers named params that scale bulge, pinch, arc, chromatic split, glow and blur. Each frame is recorded with a picture recorder, and the pill is composited on top. Pressing the button flips on press-in, the sun on press, and the pill reports through an edit callback. A web preview runs the same shader in CanvasKit with a slider panel.

Good for

  • A light and dark mode switch that deserves a signature moment
  • A page-level transition between two states of the same layout
  • A reference for running a shader over rasterized React content

Dependencies

@shopify/react-native-skiareactreact-native

Tags

Blur TransitionChromatic AberrationDark ModeGlowGradientLight ModeScreen TransitionShaderState TransitionToggle Switch

Related