Lens Bubble Story Expansion
Five soft-edged bubbles float on the home screen, each magnifying its photo with slight color fringing. Tapping one fills the screen with that photo as a heavy blur; dragging switches stories, scrolling collapses the lens. WebGL2 and Skia share one shader.
export function Example() {
const progress = useSharedValue(0);
…
Agent prompt
Add the Now In Code component "lens-bubble-story-expansion" to this project. The full source is attached at the end of this prompt. Put the files under components/lens-bubble-story-expansion/, 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 ===
Details
- Platforms
- iOS, Android
- Requires
- Expo SDK 54+
- Access
- Pro
- Updated
- 28 Oct 2026
- License
- Unlimited commercial projects
- Original design
- @rybinandy on X
Are you the designer? Ask us to change or remove this.
Add pieces from the terminal or let your agent fetch them. Until then, Copy prompt does the same job. Docs
What it does
A home screen of five soft-edged bubbles floating at different heights, each holding a photo. Tapping one makes it expand into a full story page. Swiping sideways moves between stories, and the bubble shape and the photo behind it slide with the finger. Scrolling up gathers a magnifying lens at the top of the screen, fades the large title into a small one and refracts the body text as it passes under the lens, with slight colour fringing. At the bottom the comment button morphs into a text field. Typing, picking a suggested emoji and sending adds a new comment that springs into the list, and then the keyboard closes and the page scrolls back up.
How it's built
The bubble is a lens: the same photo is mapped twice, once as a heavily blurred base and once sharp inside a soft-edged mask, then the whole group is passed through a warp shader that magnifies in a barrel shape and shifts red and blue channels apart. The shader source is generated in two dialects, GLSL for the web preview and SkSL for a Skia runtime effect in React Native. A shared core owns the interaction state machine, with pointer down, move, up, update and send-comment functions. React Native uses gesture-handler pan gestures, expo-blur and the system keyboard height. Text letter-spacing is corrected so Skia's layout wraps like native text.
Good for
- Story or highlight viewers where a thumbnail grows into a full page
- Content apps with a lens or magnifier effect over scrolling text
- Comment composers that appear by morphing from a button
Dependencies
@shopify/react-native-skiaexpo-blurreact-native-gesture-handlerreact-native