封面取色的节目页与玻璃播放器
页面底色、次级文字、下载圆点与 Tab 图标均从封面取色,提供深青、橄榄黄、深蓝三套主题。封面顶部一行像素拉伸模糊直达状态栏,底部渐隐进底色,下方是单集列表与玻璃播放器。
灵感来自 @thinkrectangles 在 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 "artwork-tinted-show-page-with-glass" to this project. The full source is attached at the end of this prompt. Put the files under components/artwork-tinted-show-page-with-glass/, 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日
- 许可证
- 无限商业项目
- 原始设计
- @thinkrectangles(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个播客节目页,会根据封面色彩重新着色。包含三种主题:深青色、橄榄黄和深蓝色。每种主题都会改变背景、磨砂的返回按钮和更多按钮、信息行、剧集单元格和迷你播放器的颜色。页面滚动时封面以一半速度产生视差,滚动一小段距离后顶部边缘会淡入页面颜色;下拉时封面会从顶部边缘拉伸。播放、快进、标签栏和剧集标签都会响应点按。标题和简介按固定行数截断并加省略号,与参考稿一致。
实现方式
共享核心保存主题表、以点为单位的布局,以及预先测量并存储的换行结果,因此各平台的文字换行完全一致。React Native 组件使用 expo-blur 的 BlurView 制作玻璃按钮和迷你播放器,使用 expo-linear-gradient 与遮罩视图制作渐隐和边缘效果,用 react-native-svg 绘制图标,并用 ScrollView 滚动;过渡动画由 requestAnimationFrame 循环驱动。玻璃效果由模糊、颜色叠层和明亮的顶部边缘组成。
适用场景
- 采用封面色彩的播客、有声书或视频节目页
- 滚动的媒体内容上方的磨砂浮动控件
- 通过一个对象切换整个页面配色的主题表模式
依赖
@react-native-masked-view/masked-viewexpo-blurexpo-linear-gradientreact-native-svgreact-native标签
模糊过渡深色渐变液态玻璃列表播放器音乐音频视差滚动驱动标签栏