带生长连线的环形弦图
深青点阵底上,20 个色块等距排在细圆环外。选中一个后,从色块两端按角度错峰长出三次贝塞尔连线,伙伴标签变亮,圆心处出现 S 形竖轴。使用 HTML 与 react-native-svg。
灵感来自 Pinterest 上的一条帖子由 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 "radial-chord-ring-with-growing-links" to this project. The full source is attached at the end of this prompt. Put the files under components/radial-chord-ring-with-growing-links/, 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 作品。提示词包含完整源码。开始使用
详情
你是设计者吗? 请求我们修改或下架此作品.
CLI 与 MCP 服务器 即将推出
在终端添加作品,或让智能体自行获取。在此之前,用“复制提示词”也能做到。 文档
功能说明
深色背景上的一个独立方形面板。二十个带标签的方块围绕一个圆环排列,上下两侧留有空隙,每侧十个。每个方块分为两半,白色一半表示输入链接,蓝色一半表示输出链接,圆环外侧还有一条小的洋红或青色竖条。一条弯曲的竖线从顶部进入,穿过选中的方块后从底部离开,线上有两个发光的圆点。点按方块即可选中它。随后它的链接会依次向圆环另一侧的相关方块生长,终点逐渐显现,相连方块的标签变为白色并加粗。悬停会使方块变亮。
实现方式
一个共享 JavaScript 核心保存测量数据、示例数据、一个小型的选中和悬停状态机、命中测试,以及返回某一时刻显示列表的函数。React Native 组件用路径、圆形、渐变和文字的 react-native-svg 绘制该列表,网页预览复用同一份列表。每条链接是一条三次曲线,其内侧控制点位于圆环中心,链接以 ease-out 曲线生长,并按其与选中项的角距离错开时间。切换选中项时,旧链接、方块和竖线会交叉淡出。
适用场景
- 展示同一组项目之间的关系,例如转账、通话或依赖关系
- 选中一项即显示其关联的关系选择器
- 看起来静止、点按后即可探索的数据面板
依赖
react-native-svgreact-native标签
数据分析图表交叉淡化深色游戏娱乐光效辉光渐变健康健身霓虹科技路径描绘错峰入场状态切换