返回组件列表
数据展示

指标卡片

适用于仪表盘和概览面板的紧凑 KPI 卡片。

预览
这里展示的源码与 shadcn 从生成 JSON 安装的源码一致。
Active users
24,892
+12.4%

Compared with the previous period

安装
构建 registry 并启动开发服务后,在消费项目中运行这条命令。
安装命令pnpm dlx shadcn@latest add http://localhost:3000/r/metric-card.json
源码与依赖
安装前可以确认组件源码路径、registry 依赖和 npm 依赖。
源码路径registry/default/metric-card/metric-card.tsx
Registry 依赖
badgecard
NPM 依赖
lucide-react