Now In Code

等距空状态抽屉动画

点阵底上的线稿文件柜滑出抽屉;点 Add Data,文件落入,抽屉关上并带一点下震,标题由 No data yet 模糊过渡为 1 record added。30° 等距矢量图形。

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

Agent 提示词

Add the Now In Code component "isometric-empty-state-drawer-animation" to this project.

The full source is attached at the end of this prompt. Put the files under components/isometric-empty-state-drawer-animation/, 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月20日
许可证
无限商业项目
原始设计
@NazmulHuda09(X)

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

CLI 与 MCP 服务器 即将推出

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

功能说明

深色的空状态界面,背景有淡淡的点阵网格,中间是等距线稿的文件柜。挂载时顶部抽屉滑开并停住。点按白色的 Add Data 按钮会使其轻微压缩,一叠带标签页的纸张落入抽屉。随后抽屉以轻微的闷响关闭,标题从空状态文案变成记录已添加的文案:旧行上升淡出,新行从下方升起,先柔后锐。稍后跟随一条副标题。之后的每次点按都会重新打开抽屉并归档另一条记录。演示模式会用触摸圆点重播整段录制的动画。

实现方式

柜子是纯 SVG 绘制。共享 JavaScript 核心定义等距投影,把柜子视为几条以三十度投影的直线边缘,并能返回任意时刻的路径显示列表。位于柜体内部的抽屉部件放在裁剪到开口处的图层中。运动由 requestAnimationFrame 循环驱动,抽屉使用缓动分段,纸张落入则使用采样表。React Native 组件把固定设计画布缩放到你给定的宽度,用 react-native-svg 渲染,按钮使用 Pressable。文字使用系统字体。

适用场景

  • 文件、文档或数据应用中的空状态
  • 确认上传或导入的首条记录庆祝动画
  • 带有运动部件的小型等距线稿插图的制作模式

依赖

react-native-svgreact-native

标签

模糊过渡按钮深色插画极简按压反馈状态切换文字动画

相关作品