电影详情与保存到收藏夹弹层
全出血海报渐隐到深色详情页;点保存后背景模糊,底部弹层弹簧上滑,每一行收藏夹点加号即可加入,加号变为对勾。两个界面由 HTML 与 React Native 共用一份 core。
灵感来自 @lumeodstudio 在 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 "movie-detail-save-to-collection" to this project. The full source is attached at the end of this prompt. Put the files under components/movie-detail-save-to-collection/, 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 月 24 日
- 许可证
- 无限商业项目
- 原始设计
- @lumeodstudio(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个深色的电影详情页及其保存面板。详情页有一张满出血的海报,逐渐渐变为近黑、再到带散落星点的藏青色;圆形的返回和分享按钮;标题、类型标签、一个蓝色主按钮和一个次要按钮;三行的简介;导演和演员头像;以及一排 More Like This 海报。点按 Save to Collection 后,页面被模糊和压暗,一个圆角底部面板弹簧式升起。面板确认已保存,并列出各个收藏夹,每个都有三图拼贴缩略图和一个加号按钮。点按加号会使计数加一,并变为蓝色对勾。关闭按钮或点按背景可关闭面板。海报可横向滑动,按下时有轻微的缩放反馈。
实现方式
共享核心保存尺寸测量、图标路径、面板打开时的弹簧曲线,以及返回面板背景状态的函数。组件使用内置的 Animated API,其弹簧形进度值运行略超过一秒。面板后方的模糊是 expo-blur 的 BlurView,其强度被动画化,并叠加深色遮罩。渐变使用 expo-linear-gradient 或 react-native-svg。所有内容按 393 × 852 点的画布绘制,冻结时间属性可以截取开场弹簧的静止画面。
适用场景
- 媒体、阅读或购物应用中的保存、收藏或加入列表流程
- 在模糊的页面上弹出确认面板的详情页
- 以海报为主视觉的影视或目录类应用
依赖
expo-blurreact-native-svgreact-native标签
底部弹层卡片深色展开收起列表内容阅读状态切换