复制一段给 AI 编程工具的提示词,包含源码、依赖和用法
属性
GaugeProps
同时支持以下类型的全部属性: Omit<React.ComponentProps<"div">, "children">
| 属性 | 类型 | 默认值 | 说明 |
|---|---|---|---|
| value* 必填 | number | — | — |
| min | number | 0 | — |
| max | number | 100 | — |
| zones | GaugeZone[] | defaultZones | Threshold 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 |
| unit | string | "" | — |
| format | (value: number) => string | — | — |
安装
$ npx shadcn@latest add https://chromotion.dev/r/gauge.json