Now In Code

展开弹层的生成预览揭晓

点 FINISH,按钮与弹层顶边以临界阻尼弹簧膨胀成蓝色 Preparing 页。虚线占位卡升起轻轻弹跳,随后白色软边圆揭开 ALL SET,占位卡变成青绿预览卡,背卡扇形展开,DONE 升起。

灵感来自 @craft_120 在 X 上发布的设计由 Now In Code 从零重建

Agent 提示词

Add the Now In Code component "expanding-sheet-generation-preview-reveal" to this project.

The full source is attached at the end of this prompt. Put the files under components/expanding-sheet-generation-preview-reveal/, 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年10月26日
许可证
无限商业项目
原始设计
@craft_120(X)

你是设计者吗? 请求我们修改或下架此作品.

CLI 与 MCP 服务器 即将推出

在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档

功能说明

一个经历三种状态的底部面板。设置状态有醒目的标题、淡蓝色提示框、两行虚线行,以及宽大的 FINISH 按钮。点击后按钮扩展成整个面板,面板升起并变为 Preparing 状态,显示虚线占位卡片和 STOP 按钮。生成完成后,面板变高并显示 ALL SET,前方是一张预览卡片,后方叠着两张卡片,并有 DONE 按钮。STOP 会反向收缩并移除占位卡片;DONE 则把面板滑走,之后新的设置面板弹起。自动演示会循环播放整个流程。

实现方式

共享的时间线核心逐帧计算,React Native 组件用 react-native-svg 和带遮罩的 View 绘制,并在 requestAnimationFrame 循环中推进。按钮的四条边、圆角半径、底部边缘和面板的顶边都遵循同一个临界阻尼弹簧,这就是按钮看起来变成面板的原因。标题使用过阻尼弹簧,从按钮标签的位置开始运动,文字使用系统圆体字体逐行排列。

适用场景

  • 带有处理中和完成状态的 AI 图像或内容生成流程
  • 任何需要展开为进度面板的确认操作
  • 以预览收尾、只有一个关闭按钮的结账或导出流程

依赖

@react-native-masked-view/masked-viewreact-native-svgreact-native

标签

底部弹层按钮卡片卡片堆叠深色电商购物展开收起金融钱包渐变极简形变视差习惯效率转场弹簧状态切换

相关作品