描线绘制的任务状态图标
十枚线性状态图标共用 1.5 线宽:虚线圆逐段长出,箭头脱环射出,半饼扫出扇面,对勾描完后发光,X 由短段拼成,禁止符划过斜杠。先六枚依次入场,再以 2×3 网格错峰齐播。
灵感来自 @keviduk 在 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 "stroke-drawn-task-status-icons" to this project. The full source is attached at the end of this prompt. Put the files under components/stroke-drawn-task-status-icons/, 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、Web
- 依赖
- Expo SDK 54+
- 权限
- Pro
- 更新于
- 2026年10月26日
- 许可证
- 无限商业项目
- 原始设计
- @keviduk(X)
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
深色背景上的十个任务状态图标:积压、分拣、进行中、已完成、已取消、已阻塞,以及若干分数和对勾变体。每个图标都以自己的描边顺序绘制出来。积压的圆环在旋转停下时由虚线段逐步构成;进行中的圆环扫过一圈并填充半圆;已完成的对勾落下时轻微弹跳,并伴有扩散的光晕;已阻塞的斜线在圆环上划过,随后整个图标扭转并稳定下来。一个图标切换到下一个时,旧图标淡出,新图标同时开始。网格模式下,全部图标以错开的起点同时播放。
实现方式
每个图标都是 react-native-svg 的路径和圆形。普通 JavaScript 核心将经过的时间转换为每个图标的描边状态:虚线偏移、弧角、缩放、旋转和不透明度,使用三次贝塞尔曲线和基础缓动函数。requestAnimationFrame 循环把经过时间传给组件,因此没有 Reanimated,也没有原生动画模块。图标位于 16 单位的网格上,并随容器缩放。
适用场景
- 任务或项目跟踪工具中的状态选择器和问题行
- 状态在原位发生变化的空状态和引导时刻
- 任何需要以描边绘制感进入动画的小型图标集
依赖
react-native-svgreact-native标签
按钮工作协作深色设计工具光效辉光图标极简形变弹簧错峰入场状态切换系统界面