liquid-glass-screens README

The project's README from github.com/Appllama/liquid-glass-screens. As one markdown file: README.md.

Appllama

React Native Expo Liquid Glass Screens — 2 Swipe-Up Welcome Cookbooks

An open-source pair of liquid-glass welcome screens for React Native and Expo: one glass sphere, one gesture, two skies. A UI study inspired by Wabi's create screen.

CI Expo SDK 57 React Native 0.86 React Native Skia TypeScript GPL-3.0 License

Explore cookbooks · Copy a prompt · Replicate the artwork · Run locally · Use the API · Legal notice

Cookbook 1, Sky: the daylight liquid-glass welcome screen at the gate, mid-swipe, and open

Cookbook 2, Astro: the night liquid-glass welcome screen at the gate, mid-swipe, and open

Showcase artwork uses simulator captures of this implementation. The reference clip that the interaction was calibrated against is not redistributed.

[!IMPORTANT] Educational reference only. This is an independent, unofficial Appllama project and is not affiliated with or endorsed by Wabi, Apple, or any other referenced company. Every bitmap and clip in this repository was generated for it; the interaction grammar is a study of a publicly visible screen. Do not ship these screens unchanged. Before any public or commercial use, replace the wordmarks, stickers, copy, and backdrops with your own, then make the final composition and motion meaningfully unique. Read the full intellectual-property notice.

2 cookbooks. One Expo project. Copy either.

Liquid Glass Screens is a React Native Expo cookbook for developers studying how a physical, gesture-driven welcome screen is built. Both cookbooks are the same TypeScript component with a different theme, drawn into one React Native Skia canvas and moved entirely on the UI thread with React Native Reanimated and React Native Gesture Handler.

The screen works like this:

You can:

The project comes from the product-flow research behind Appllama, a library of onboarding, paywall, and product UI from leading iOS apps.

The 2 cookbooks

Cookbook Screen ID Component Backdrop Return Source Agent prompt
Cookbook 1 — Sky sky SkyGlassWelcome Looping cloud video Stickers dip, float back up, and fade View theme Copy prompt
Cookbook 2 — Astro astro AstroGlassWelcome Two-layer still: stars + horizon glow Stickers spiral into a stardust vortex View theme Copy prompt

Both cookbooks render through LiquidGlassScreen. A theme decides the backdrop, the wordmark, the forty sticker slots, the palette, the copy, the blur tint, the lens dispersion, the day-or-night glass tuning, and how the plume leaves.

Copy-paste prompts

Open the matching section, use GitHub's copy button, and paste the complete prompt into a coding agent while it is working inside your existing Expo app. Each prompt tells the agent exactly which repository files, assets, native dependencies, and semantic actions to inspect.

The prompts are intentionally strict about preserving your current app architecture and intentionally strict about replacing the study's identity before release.

Cookbook 1 — Sky liquid-glass welcome screen — copy prompt
You are working inside my existing Expo React Native repository.

Use https://github.com/Appllama/liquid-glass-screens as a read-only technical reference. Integrate only Cookbook 1, the Sky liquid-glass welcome screen, into my app. Do not turn my app into the gallery and do not modify unrelated features.

Reference files:
- src/liquid-glass/liquid-glass-screen.tsx, src/liquid-glass/glass.ts, src/liquid-glass/orb-field.tsx, src/liquid-glass/copy.tsx, src/liquid-glass/types.ts
- src/liquid-glass/cookbooks/sky.ts and src/liquid-glass/sky-glass-welcome.tsx
- assets/cookbooks/sky/ (sky.mp4, sky-poster.png, wordmark.png, stickers/)
- the Sky section of docs/MOTION_SPEC.md
- src/app/_layout.tsx only as an asset preloading reference
- NOTICE.md and docs/ASSET_PROVENANCE.md

Public API:
- Component: SkyGlassWelcome
- Screen ID: sky
- Semantic action: sky.lets-go
- Props: initialState ('gate' | 'open'), onActionPress, onPrimaryPress
- Relevant packages: @shopify/react-native-skia, react-native-reanimated, react-native-worklets, react-native-gesture-handler, expo-blur, expo-image, expo-status-bar, and expo-asset

Requirements:
1. Before editing, inspect my Expo SDK, React Native version, router, package manager, native splash configuration, onboarding routes, and existing dependencies. This screen needs a development build or a native build; it does not run in Expo Go.
2. Copy only this component, its theme, its assets, and the transitive helpers it actually imports (glass.ts, orb-field.tsx, copy.tsx, types.ts). Do not copy the demo router, the gallery home, or Cookbook 2.
3. Preserve my package versions, navigation, state architecture, app configuration, and native projects. Install only missing compatible packages with npx expo install, then rebuild the native app.
4. Preload the video, poster, wordmark, and stickers before revealing the React tree. Adapt the loading pattern to my app instead of replacing my root layout.
5. Mount the component inside a full-height flex: 1 surface with no visible navigation header and no surrounding safe-area padding, inside a GestureHandlerRootView; the component owns its canvas and status bar.
6. Reproduce the reference behavior accurately: keep the 402×874 reference geometry, the position-driven sphere size, the lens backdrop filter and glass shader, the force-driven caustic, the sticker plume and its fall, the blur-wipe copy with the rotating third line, the reduced-motion behavior, and the accessibility labels. Do not replace the gesture with a button or the motion with a generic fade.
7. Wire the semantic action through onActionPress to my existing onboarding route.
8. Treat this as an educational prototype. Before any public or commercial release, replace the wordmark, stickers, copy, and backdrop with authorized original artwork, then make the final composition and motion meaningfully unique.
9. Validate the swipe up, a partial drag that springs back, the swipe down, the "Let's go" action, reduced motion, TypeScript, lint, an iPhone simulator, and one Android viewport, in a native or development build.
10. Finish by summarizing every file and dependency changed.

Cookbook 2 — Astro liquid-glass welcome screen — copy prompt
You are working inside my existing Expo React Native repository.

Use https://github.com/Appllama/liquid-glass-screens as a read-only technical reference. Integrate only Cookbook 2, the Astro liquid-glass welcome screen, into my app. Do not turn my app into the gallery and do not modify unrelated features.

Reference files:
- src/liquid-glass/liquid-glass-screen.tsx, src/liquid-glass/glass.ts, src/liquid-glass/orb-field.tsx, src/liquid-glass/copy.tsx, src/liquid-glass/types.ts
- src/liquid-glass/cookbooks/astro.ts and src/liquid-glass/astro-glass-welcome.tsx
- assets/cookbooks/astro/ (stars.png, glow.png, wordmark.png, stickers/)
- the Astro section of docs/MOTION_SPEC.md
- src/app/_layout.tsx only as an asset preloading reference
- NOTICE.md and docs/ASSET_PROVENANCE.md

Public API:
- Component: AstroGlassWelcome
- Screen ID: astro
- Semantic action: astro.lets-go
- Props: initialState ('gate' | 'open'), onActionPress, onPrimaryPress
- Relevant packages: @shopify/react-native-skia, react-native-reanimated, react-native-worklets, react-native-gesture-handler, expo-blur, expo-image, expo-status-bar, and expo-asset

Requirements:
1. Before editing, inspect my Expo SDK, React Native version, router, package manager, native splash configuration, onboarding routes, and existing dependencies. This screen needs a development build or a native build; it does not run in Expo Go.
2. Copy only this component, its theme, its assets, and the transitive helpers it actually imports (glass.ts, orb-field.tsx, copy.tsx, types.ts). Do not copy the demo router, the gallery home, or Cookbook 1.
3. Preserve my package versions, navigation, state architecture, app configuration, and native projects. Install only missing compatible packages with npx expo install, then rebuild the native app.
4. Preload the star layer, the glow layer, the wordmark, and the stickers before revealing the React tree. Adapt the loading pattern to my app instead of replacing my root layout.
5. Mount the component inside a full-height flex: 1 surface with no visible navigation header and no surrounding safe-area padding, inside a GestureHandlerRootView; the component owns its canvas and the light status bar.
6. Reproduce the reference behavior accurately: keep the 402×874 reference geometry, the position-driven sphere size, the two-layer backdrop with the glow that dissipates through the glass, the night glass tuning, the zero-dispersion dome, the force-driven caustic, the sticker plume, the stardust vortex on the way down with its glow flare, the blur-wipe copy with the rotating third line, the reduced-motion behavior, and the accessibility labels. Do not replace the gesture with a button or the motion with a generic fade.
7. Wire the semantic action through onActionPress to my existing onboarding route.
8. Treat this as an educational prototype. Before any public or commercial release, replace the wordmark, stickers, copy, and backdrop with authorized original artwork, then make the final composition and motion meaningfully unique.
9. Validate the swipe up, a partial drag that springs back mid-vortex, the swipe down, the "Let's go" action, reduced motion, TypeScript, lint, an iPhone simulator, and one Android viewport, in a native or development build.
10. Finish by summarizing every file and dependency changed.

Replicate the artwork

Every wordmark, sticker, backdrop, and clip in this repository was generated, and the exact prompts and post-processing steps are published so you can make your own set in the same visual language, in your own identity:

The prompts were run with GPT Image 2 at high quality and 1K, Seedance 2.0 for the cloud loop, and a background-removal pass for the die-cuts. Any comparable image model will do; keep the style sentences and the "no text, no watermark" tail.

Requirements: Node.js 22.13 or newer, Xcode for iOS, or Android Studio for Android. The screens use React Native Skia's runtime shaders and video decoding, so they run in a native build, not in Expo Go.

git clone https://github.com/Appllama/liquid-glass-screens.git
cd liquid-glass-screens
npm ci
npm run ios

The default route is the gallery home with two buttons, Cookbook 1 and Cookbook 2. Each cookbook also has a direct route:

/sky
/astro

Open one directly, or land with the sphere already up and the plume out:

npx uri-scheme open "liquid-glass://astro" --ios
npx uri-scheme open "liquid-glass://sky?state=open" --ios

How the glass works

Each cookbook is one Skia Canvas with five layers, bottom to top:

Layer What it is
Scene The cloud video (Sky) or the star layer plus an additive glow layer (Astro), drawn inside the canvas so the lens can bend it.
Stickers Forty die-cut sprites moved by a UI-thread frame callback: buoyancy, wander, a home in the plume, neighbour repulsion, and the finger's push. Astro adds a 260-mote stardust ring buffer.
Lens A BackdropFilter running LENS_SKSL: thick-glass magnification, a bevelled rim that shears, per-channel dispersion, and a "slosh" offset that drags the picture inside with the motion.
Glass GLASS_SKSL: the body, rim light, sheen, halo, and the motion caustic that focuses from a lavender bloom into a bowl of cyan-to-blue light with a gold thread. A night uniform blends the daylight and night tunings.
Copy React Native Text above the canvas — the wordmark, the hint, the headline with its struck word, the rotating third line with a per-word blur wipe, and the pill.

The sphere's radius is a pure function of its position, and its caustic answers force rather than speed, so shrinking toward the button and growing back read identically in both directions.

React Native liquid glass API

Import one component

import { AstroGlassWelcome, type LiquidGlassActionId } from './src/liquid-glass';

function handleAction(actionId: LiquidGlassActionId) {
  if (actionId === 'astro.lets-go') {
    // Navigate to your original onboarding flow.
  }
}

export function Welcome() {
  return <AstroGlassWelcome onActionPress={handleAction} />;
}

Select from the typed registry

import { CookbookScreen, type CookbookId } from './src/liquid-glass';

export function Preview({ name }: { name: CookbookId }) {
  return <CookbookScreen name={name} initialState="open" onActionPress={(id) => console.log(id)} />;
}

Bring your own theme

import { LiquidGlassScreen, SKY_THEME } from './src/liquid-glass';

const MY_THEME = {
  ...SKY_THEME,
  id: 'sky' as const,
  wordmark: require('./assets/my-wordmark.png'),
  copy: { ...SKY_THEME.copy, headline: 'Plan and share', struck: 'spreadsheets', kept: 'trips' },
};

export function Welcome() {
  return <LiquidGlassScreen theme={MY_THEME} onPrimaryPress={() => {}} />;
}

Source-distributed Git dependency

The package exports src/index.ts, so SDK-matched workspaces can consume it directly:

npm install github:Appllama/liquid-glass-screens
import { SkyGlassWelcome } from 'liquid-glass-screens';

The demo currently targets Expo SDK 57, React Native 0.86, React Native Skia 2.6, and Reanimated 4.5. Existing apps on another Expo SDK should prefer the copy-paste prompt workflow so npx expo install can resolve compatible native dependency versions.

Shared props

Prop Purpose
initialState 'gate' (default) starts with the dome on the bottom edge. 'open' starts with the sphere already up and the plume out — the deterministic state for screenshots.
onActionPress Receives the typed semantic ID (sky.lets-go or astro.lets-go) when the pill is pressed.
onPrimaryPress Backward-compatible handler for the pill. onActionPress takes precedence.

LiquidGlassActionId, LiquidGlassActionPressHandler, COOKBOOK_IDS, COOKBOOK_METADATA, CookbookTheme, and STICKER_SIZES are exported for autocomplete and typed tooling.

Motion, responsiveness, and accessibility

Project structure

assets/cookbooks/sky/           Cloud loop, poster, wordmark, 22 stickers
assets/cookbooks/astro/         Star layer, glow layer, wordmark, 24 stickers
docs/MOTION_SPEC.md             Measured geometry, thresholds, springs, and physics
docs/ASSET_PROVENANCE.md        Auditable generated-asset inventory
prompts/                        Prompts to regenerate every asset, per cookbook
scripts/                        Simulator recording and Maestro flows used for verification
src/app/                        Expo Router demo: the gallery home and the two routes
s

liquid-glass-screens (Appllama/liquid-glass-screens)

Searching Database…

这是什么?这是一个开源的 React Native/Expo 实战示例,包含两个“液态玻璃”欢迎屏幕——一个玻璃球在滑动时收缩成加号按钮,配有漂浮贴纸和交互手势。它是受 Wabi 创建界面启发的 UI 研究,供开发者学习或复制。
这是现成的应用,还是能放进我自己项目的组件?两者都是:它是一个可以运行来探索两个实战示例的 Expo Router 演示应用,也是一个单独可复用的 TypeScript 组件(LiquidGlassScreen),带有各主题的资源,可以复制粘贴到现有的 React Native 应用中。
怎么运行演示,或把示例添加到我自己的应用里?克隆仓库并运行 Expo 画廊(需要原生构建,不支持 Expo Go),或者把 LiquidGlassScreen 组件及其主题/资源复制到现有的 Expo 应用中,也可以把示例专属的提示词粘贴给编码智能体,让它帮你集成这个屏幕。
构建它需要安装什么?Node.js 22.13 或更新版本,加上 iOS 所需的 Xcode 或 Android 所需的 Android Studio,因为它需要原生构建,而不是 Expo Go。
我可以把这些屏幕原样放进我的应用发布吗?不行——README 明确说明不要原样发布这些屏幕;在任何公开或商业使用之前,你必须把文字标识、贴纸、文案和背景替换成你自己的。
它在 iOS 和 Android 上都能运行吗?可以,它用 Expo 构建并面向两个平台,不过 README 的构建说明指出,原生构建路径是 iOS 用 Xcode、Android 用 Android Studio。
两个示例在视觉上有什么区别?示例 1(Sky)使用循环播放的云朵视频背景,贴纸在松开时会先下沉再浮回;示例 2(Astro)使用双层星星/地平线光晕背景,贴纸则会螺旋卷入星尘漩涡。
玻璃效果究竟是怎么渲染的?每个屏幕都是一个 Skia Canvas,堆叠五层——场景、贴纸、镜头背景滤镜(放大、色散、晃动)、玻璃着色器(主体、边缘光、焦散)以及用于文案的 React Native Text——全部通过 Reanimated 和 Gesture Handler 在 UI 线程上做动画。
我可以自己重新生成贴纸和背景吗?可以,生成每个文字标识、贴纸和背景所用的确切提示词都发布在 prompts/sky-cookbook.md 和 prompts/astro-cookbook.md 中,最初是用 GPT Image 2 和 Seedance 2.0 运行的。
它支持无障碍和减弱动态效果吗?支持——在减弱动态效果模式下,落定弹簧不再回弹、标题改为淡入而不是擦入,CTA 胶囊按钮在出现前会从无障碍树中隐藏,页面还会把滑动提示作为它的无障碍标签。
Creator
Appllama
Size
5 MB
Stars
312
Updated
CommitSep 05
Age
1mo
Commits · 90 Days