Threads - Spoiler Masking
This example recreates the Threads app spoiler text masking effect — sensitive content is hidden behind an animated particle mask that users can tap to reveal.
Source Code
Demo
Implementation Details
The animation uses:
@shopify/react-native-skiaRuntimeEffect shader for GPU-accelerated particle renderingreact-native-reanimatedshared values to drive the shader's time uniform- A custom GLSL fragment shader that generates particles with deterministic pseudo-random properties
- Per-visual-line masking using
onTextLayoutto measure wrapped text lines - Tap-to-reveal with a smooth opacity fade transition