酒吧名单卡
分析细分列表 - 按设备、浏览器、操作系统、国家/地区或来源划分的流量作为排名行,其背景栏对每个项目的份额、栏上的标签、右侧的指标进行编码。我们的下划线选项卡在列表之间切换,度量标题位于同一基线上,长列表在一个小胶囊后面淡出,该胶囊扩大了其余部分,以便卡片随之增长。
访客
访客
桌面61%
手机31%
平板电脑8%
使用共享 UI 包或自定义导入别名? 配置您的安装路径 在运行 CLI 之前。复制粘贴示例使用默认导入。
选项卡式列表
tabs 是 { id, label, items }[];每个项目可能带有一个 图标 - 旗帜、图标、任何 16 像素的东西。份额相对于选项卡的总数,条形宽度相对于其最大的项目。
import * as Flags from "country-flag-icons/react/3x2";
<BarListCard metricLabel="Visitors" tabs={[ { id: "countries", label: "Countries", items: [ { label: "United States of America", value: 3120, icon: <Flags.US className="h-3 w-[18px] rounded-[2px]" /> }, { label: "India", value: 2160, icon: <Flags.IN className="h-3 w-[18px] rounded-[2px]" /> }, // … ], }, { id: "sources", label: "Sources", items: [{ label: "Direct", value: 5240 }, /* … */] }, ]} defaultTab="countries" onTabChange={(id) => track("breakdown_tab", { id })}/>单列表和单声道
通行证 项目 + 标题 对于一个没有选项卡的列表, metric="value" 打印原始数字而不是股票,以及 mono 对于单一的灰色墨水。
{/* One list, no tabs - a heading takes the tab strip's place */}<BarListCard title="Pages" metricLabel="Views" metric="value" items={pages} limit={4} />
{/* Single ink, mono grey bars */}<BarListCard mono />