uibrik

Gauge

New

Preview

Customize

Value64
Gigabytes
Accent

Usage

import { Gauge } from "@/components/uibrik/gauge/gauge";

<Gauge />

Installation

npx shadcn@latest add https://uibrik.com/r/gauge.json
Adds the files to components/uibrik/gauge and installs @number-flow/react, @tabler/icons-react, motion and react-use-measure. With the @uibrik namespace set up: npx shadcn@latest add @uibrik/gauge.

Props

Gauge
title
Type string
"Storage"
Names the metric.
value
Type number
64
Current reading.
format
Type Intl.NumberFormatOptions
gigabytes
Formats every number, e.g. { style: "percent" }.
accent
Type string
""
Arc colour without zones. Empty uses the chart palette.
min
Type number
0
Start of the range.
max
Type number
100
End of the range.
thresholds
Type { at: number; status: "good" | "warning" | "critical" }[]
warning 70, critical 90
Where each zone begins. Below the first is good. Empty uses one colour.
labels
Type Partial<Record<"good" | "warning" | "critical", string>>
–
Words for each zone, shown beside its dot.
caption
Type string
"of 100 GB plan"
Note under the gauge.
className
Type string
–
Classes for the outer shell.