落下卡堆展开为倾斜轮播
标题逐词由模糊淡入并以弹簧升到顶部。三张卡片带不同倾角落下,弹成错落的一堆,再按 3、2、1 顺序展开成横向轮播,圆点与 Continue 按钮淡入。翻页沿用同一弹簧。
灵感来自 @dwijaxo 在 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 "dropped-card-pile-into-tilt-carousel" to this project. The full source is attached at the end of this prompt. Put the files under components/dropped-card-pile-into-tilt-carousel/, 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月21日
- 许可证
- 无限商业项目
- 原始设计
- @dwijaxo(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
引导页开场时,标题逐词出现,每个词都从模糊中清晰起来,随后是副标题。标题区块随后向上移动。三张高卡片从上方带着轻微倾斜落下,堆叠成相互重叠的一摞,然后展开成横向轮播,每张卡片都会轻轻跳动一下。页面圆点和“Continue”按钮淡入。滑动时卡片依次切换;卡片滑动过程中会绕竖直轴旋转,内侧边缘朝向观众,因此卡片看起来像梯形。侧边卡片比中间卡片略高。开场结束后可以拖动卡片。卡片带有颗粒、圆点和圆环图案的插画,没有照片素材。
实现方式
共享 JavaScript 核心保存时间线、堆叠和槽位姿态,以及程序生成的卡片纹理:点状密度图案,以及一组光球和细圆环,没有照片素材。React Native 组件使用依次为 translate、perspective、rotateY、rotateZ 的普通 transform 数组,旋转角度根据每张卡片与滚动位置的距离计算。拖动使用 PanResponder。字体通过 expo-font 加载,Skia 用于生成纹理,requestAnimationFrame 循环提供时间。弹簧是解析式阻尼弹簧,落下、展开和翻页分别使用不同的刚度。
适用场景
- 围绕少量大卡片构建的引导或套餐选择页面
- 运动中的卡片应向观众倾斜的横向轮播
- 先堆叠卡片、再展开的开场动画
依赖
@shopify/react-native-skiaexpo-fontreact-native标签
3D 旋转模糊过渡卡片卡片堆叠轮播颗粒质感引导页弹簧错峰入场文字动画