Now In Code
Get access

Touch Focus Depth Blur Field

On press, elements blur by distance from the finger within 60 ms, hold while pressed, and sharpen 170 ms after release. Five demos include emoji, a color grid, a slider, spectrum bars and a dot matrix, blurred per element in CanvasKit and Skia.

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

Agent prompt

Add the Now In Code component "touch-focus-depth-blur-field" to this project.

The full source is attached at the end of this prompt. Put the files under components/touch-focus-depth-blur-field/, 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
11 Oct 2026
License
Unlimited commercial projects
Original design
@ty_kra_lab 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

Five dark demo pages where touch acts like a camera focus point. Everything under the finger stays sharp and the further an element is from it, the blurrier it becomes. One page holds a grid of emoji that swell together when pressed. Another has a ten by ten grid of rainbow squares that dissolve with distance, with multi-finger support. A third has eighteen slider tracks whose knobs fog, stretch and drift away from the finger and return to their values on release. A fourth has a row of thin green bars that rise near the finger and sink away from it into a blur. The fifth has numbered rings in a dashed frame that light up and enlarge near the finger. The blur holds while pressed and clears quickly on release.

How it's built

A shared core file keeps the layout, an integration step and a draw routine. In React Native, a Skia picture recorder records the same draw calls, and each element gets its own Skia blur image filter, with sigma quantised to quarter points so filters can be reused. Blur amount is the touch intensity times a smoothstep of the distance to the nearest finger, with separate attack and release time constants plus a per-element follow time. The browser preview runs the same calls through CanvasKit. Emoji and digits are pre-rendered bitmaps. The per-element approach was chosen over a full-screen post-process because blur varies by element.

Good for

  • Depth-of-field style touch feedback in galleries, pickers and grids
  • Data displays such as bars or sliders where the touched area should stand out
  • Game or toy interfaces with a field of items that react to a finger

Dependencies

@shopify/react-native-skiareact-native

Tags

Blur TransitionButtonCardChartDark ModeDesign ToolsGames and EntertainmentGradientIconLiquid GlassLong PressMinimalMorphingNavigation BarNumeric DisplayPhysics SimulationSliderState TransitionSystem UI

Related