玻璃泡计数揭晓并落入滑杆
玻璃泡里的数字依次换成四个值,下方图标点亮为彩色球,发光粒子绕泡转动;随后粒子收成细柱落进滑杆并填充渐变。HTML 与 React Native SVG 共用时间线。
灵感来自 @alexloviagin 在 X 上发布的设计由 Now In Code 从零重建
import { Piece } from "./components";
export function Example() {
const progress = useSharedValue(0);
…
export function Example() {
const progress = useSharedValue(0);
…
Agent 提示词
Add the Now In Code component "counting-glass-bubble-reveal-into-slider" to this project. The full source is attached at the end of this prompt. Put the files under components/counting-glass-bubble-reveal-into-slider/, 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 作品。提示词包含完整源码。开始使用
详情
- 平台
- iOS、Android
- 依赖
- Expo SDK 54+
- 权限
- Pro
- 更新于
- 2026年11月23日
- 许可证
- 无限商业项目
- 原始设计
- @alexloviagin(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个关于生理年龄的引导揭示页面,背景是深绿色渐变。屏幕中央的玻璃气泡显示的年龄依次从 99 跳到 72、54,最后是 32,数字在错开的时刻变化,气泡也从白色玻璃变为青柠色。每次跳动都会点亮下方三个区域图标之一,颜色分别为青柠、粉紫或橙色,并在气泡周围的光环中加入同色粒子,光环缓慢顺时针转动。文字淡出,彩色粒子聚拢成一道细柱,像沙漏里的沙一样落入下方的实际年龄滑块。滑块拇指向左移动五岁,留下青柠到淡紫的填充,灰色点阵随之回到屏幕,然后淡入一段说明、一张计算方式卡片和一个白色分享按钮。
实现方式
共享核心中有一个纯帧函数,返回所有动画值:气泡、数字图层、92 个网格点、粒子列表、图标、文字、滑块和填充。粒子由固定种子生成。React Native 组件用 react-native-svg 绘制,每个粒子的颜色用径向渐变代替模糊光晕,字体使用 expo-google-fonts 的无衬线和衬线字体。requestAnimationFrame 循环提供时间。没有使用 Skia 或 Reanimated。
适用场景
- 在引导测验结束时展示健康评分或年龄结果
- 多个类别共同决定一个数字的结果页面
- 必须每次以相同方式重播的基于粒子的过渡
依赖
@expo-google-fonts/hanken-grotesk@expo-google-fonts/roboto-serif@expo-google-fonts/source-serif-4react-native-svgreact-native标签
光效辉光渐变健康健身液态玻璃数字滚动数字引导页粒子滑杆状态切换