模糊背景的聊天历史卡片翻阅
按住输入框上方的小条拖动或横滑,聊天背景模糊,12 个过往话题以渐变卡浮现;选中后卡片缩小,聊天弹簧回到该话题。HTML 与 React Native 共用 core。
灵感来自 @samdape 在 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 "blurred-chat-history-card-scrubber" to this project. The full source is attached at the end of this prompt. Put the files under components/blurred-chat-history-card-scrubber/, 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月14日
- 许可证
- 无限商业项目
- 原始设计
- @samdape(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个聊天界面,顶部栏下方有渐进式模糊,助手头像,以及按时间顺序排列的十二个话题。按住输入框上方的小型历史条,或在聊天区域左右滑动,即可打开横向历史:一排大卡片,每张代表一个过去的话题,当前卡片为全尺寸,相邻卡片较小且半透明,背后的聊天内容变为模糊。松手后按速度吸附。选中一张卡片会放大并淡出,聊天跳转到该话题,并从约 200 点上方弹入就位。最后一张卡片打开一个网格,包含进行中和已收藏的项目;聊天翻转成深色卡片,点按网格中的卡片会变形为话题详情页。
实现方式
共享核心模块计算布局和过渡,组件在 requestAnimationFrame 循环中用 react-native-svg 绘制。模糊和渐隐由 expo-blur、expo-linear-gradient 和遮罩视图实现,顶部栏下方的渐进式模糊就是这样制作的。PanResponder 和 ScrollView 处理拖动、滑动和聊天滚动。卡片到详情页的变化会插值一个容器矩形,并将内容缩放到该宽度,顶部对齐并裁剪,因此表现得像共享元素。聊天到网格的切换使用绕 Y 轴的旋转。
适用场景
- 需要快速返回较早对话的助手或聊天应用
- 任何较长线性信息流的时间轴滑动条
- 可以打开为详情页的已保存或收藏项目网格
依赖
@react-native-masked-view/masked-viewexpo-blurexpo-linear-gradientreact-native-svgreact-native标签
AI 助手头像模糊过渡卡片轮播聊天工作协作深色拖拽展开收起渐变液态玻璃极简形变社交弹簧错峰入场滑动手势输入框