Atelier UI

搜索组件…

搜索组件…

Gauge

半圆仪表盘,带指针或弧形填充、阈值色带与 meter 语义。

在沙盒中编辑

复制一段给 AI 编程工具的提示词,包含源码、依赖和用法

属性

GaugeProps

同时支持以下类型的全部属性: Omit<React.ComponentProps<"div">, "children">

属性类型默认值说明
value* 必填number——
minnumber0—
maxnumber100—
zonesGaugeZone[]defaultZonesThreshold zones from low to high. Defaults to green / amber / red at 60% and 85%.
variant"needle" | "arc""needle""needle" shows solid zones with a needle; "arc" fills an arc up to the value
size"sm" | "md" | "lg""md"—
label* 必填string—Accessible name and visible caption
unitstring""—
format(value: number) => string——

安装

$ npx shadcn@latest add https://chromotion.dev/r/gauge.json

同类组件