阶段条形图卡片
漏斗作为一个列表 - 图表轨道上每个阶段一个圆形胶囊,名称在左侧,顶部阶段的价值和份额在右侧。宽度动画在安装上,悬停在舞台上使其变暗并淡化其余部分,标题随之而来。采取与漏斗图卡相同的阶段。
Pipeline
1,180
+2.4%访问量
1,180100%
注册
79067%
活跃
46039%
Pro
25021%
团队
12010%
企业
403%
访问量
1,180注册
790活跃
460Pro
250团队
120企业
40使用共享 UI 包或自定义导入别名? 配置您的安装路径 在运行 CLI 之前。复制粘贴示例使用默认导入。
单声道
mono 降低单一墨水的每级色调 - 浅色上的中灰色,深色上的近白色 - 参考的单级漏斗。
{/* Single ink: every pill in one grey (mid grey on light, near-white on dark) */}<StageBarsCard mono />数据
stages 是一个平面 { label, value, color? } 列表,首先是漏斗顶部。添加一个阶段,它会得到一行和一个图块(每行三个图块,卡片会增长以适应);标签列大小为最长名称,份额来自第一阶段。每个阶段可以携带 14px 图标 绘制在其栏内的左端 - showIcons={false} 将它们全部隐藏起来。当您通过时,经期药会出现在下拉列表中 ranges - 每个范围都有自己的数据(并且可选 delta / headline) 并且图表在选择时重新显示动画; onRangeChange 让你取而代之。在没有数据属性的情况下,该卡提供了三个演示范围,这就是上面的预览所使用的。
import { RiEyeLine, RiUserAddLine } from "@remixicon/react";
// One entry per stage, top of the funnel first - the same shape FunnelChartCard// takes, plus an optional 14px icon drawn at the left end inside the bar.const stages = [ { label: "Visits", value: 4820, icon: <RiEyeLine className="size-3.5 text-neutral-950" /> }, { label: "Sign-up", value: 3260, icon: <RiUserAddLine className="size-3.5 text-neutral-950" /> }, { label: "Active", value: 2010 }, { label: "Pro", value: 1160 }, { label: "Team", value: 540 }, { label: "Enterprise", value: 180, color: "var(--color-chart-1)" }, // override any colour];
<StageBarsCard title="Pipeline" stages={stages} headline={4820} // optional resting headline (defaults to the first stage) delta={0.024} // "+2.4%" chip range="Last 30 days" // static pill… showIcons // default; false hides the icons without removing them from the data/>
// …or a working period dropdown: each range overrides stages / delta / headline.<StageBarsCard title="Pipeline" ranges={[ { id: "7d", label: "Last 7 days", stages: week, delta: 0.024 }, { id: "30d", label: "Last 30 days", stages: month, delta: 0.061 }, { id: "90d", label: "Last 90 days", stages: quarter, delta: -0.012 }, ]}/>