能量弧表与生长的花
双段弧形能量表和大号百分比下方是山丘,能量下降时花缩回花苞,记录的行为化作光点飞上花头后它再次盛开。一条 frame(t) 时间线同时驱动 HTML 预览和 React Native 组件。
灵感来自 @jasonnfonsecaa 在 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 "energy-gauge-growing-flower" to this project. The full source is attached at the end of this prompt. Put the files under components/energy-gauge-growing-flower/, 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月18日
- 许可证
- 无限商业项目
- 原始设计
- @jasonnfonsecaa(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
一个平静的夜间健康首页,背景是深绿色草地。顶部的日期条为每一天显示一张小花缩略图,附带星期和百分比,所选日期位于玻璃方块上。下方是一个九十度的弧形仪表,一段为青柠色,一段为白色,每段都带有沿弧线旋转的标签,中心有大号百分比。山丘上的花随数字生长,从花苞到郁金香杯形,再到半开的花朵,最后成为完整的雏菊。上方是衬线标题,下面一行文字。十七秒的循环先把能量降到零,花缩回花苞,然后三件物品变成金色碎片飞向花朵,仪表回升至一百。
实现方式
共享核心中的一个纯函数接收时间,返回整帧内容,包括仪表弧长、花的阶段、日期条偏移、文字位置和粒子路径。能量变化遵循实测的三次贝塞尔曲线,日期条以对称缓动滑动。组件使用 react-native-svg 绘制弧、花和碎片,天空与山丘使用 expo-linear-gradient,玻璃部分使用 expo-blur。requestAnimationFrame 循环驱动时间,字体钩子负责加载字体。能量下降时背景会变暗。
适用场景
- 以单一能量分数为核心的日常健康、情绪或习惯追踪器
- 与一朵逐渐生长的插画含义一致的仪表
- 适用于健康或冥想应用的平静、低对比首页
依赖
react-native-svgexpo-linear-gradientexpo-blurexpo-fontreact-native标签
图表深色数据填充光效辉光健康健身数字进度条柔和治愈错峰入场