液态金属玻璃状态卡
银色液态金属管缓慢弯曲并从深色磨砂玻璃卡后穿过,卡上有 LIVE 脉冲、三行状态和一道扫光。金属、玻璃和扫光都由一份程序化 SkSL 着色器绘制,不用贴图,文字用 React Native 视图叠加。
灵感来自 @dakshpixelup 在 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 "liquid-metal-glass-status-card" to this project. The full source is attached at the end of this prompt. Put the files under components/liquid-metal-glass-status-card/, 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 日
- 许可证
- 无限商业项目
- 原始设计
- @dakshpixelup(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
浅灰色场景中,银色液态金属管缓慢地改变形状,循环一圈;一道光带会从一张卡片后方掠过,卡片下方是一个张开的光柱。卡片是磨砂的深蓝灰色状态卡,包含标题、带脉动环的 LIVE 药丸,以及三行内容,每行有图标方块、标题和副标题,还有一个 Reorder 操作。卡片为空时,一道对角光带会从上面扫过。各行离开后又以错开的顺序重新进入。动画是一个六秒的循环,回到第一帧,组件接受宽度和可选的冻结时间。
实现方式
一个 SkSL runtime 着色器同时绘制背景金属和玻璃卡片。金属管是通过在三次贝塞尔曲线上做最近点查找得到的固定曲线,半径沿曲线插值,并用平滑最小值融合;随后由依据表面法线驱动的摄影棚式环境函数进行光照。玻璃色调、斜面和光扫也在同一着色器中加入。文字、图标方块和脉动环使用普通视图和 react-native-svg。Reanimated 的帧回调和共享值将时间送入着色器 uniform,网页预览则通过 CanvasKit 运行同一段 SkSL。
适用场景
- 在丰富的动态背景之上的仪表盘主视觉或状态卡片
- 带实时指示器的商店、车队或服务健康摘要
- Skia 运行时效果中液态金属着色的参考
依赖
@shopify/react-native-skiareact-native-reanimatedreact-native-svgexpo-fontreact-native标签
数据分析卡片流体光效辉光浅色液态玻璃着色器