Simulates prefers-reduced-motion for the demo. Off follows your system setting.
Steps focus through the demo with ] and [. Tab, arrows, and Escape stay native so the component behaves as shipped.
1
A half dial of tick marks that light up to show a value within a range.
npx shadcn@latest add ikislay/pixel-ui/gaugeimport { Gauge } from "@/components/ui/gauge"export function Demo() {return <Gauge label="Server load" value={68} caption="CPU load" format={(n) => Math.round(n) + "%"} />}
1// Loading…
Options you can pass to customize this component.
value*numberThe current value. It is clamped between min and max.
minnumberThe value at the left end of the dial.
maxnumberThe value at the right end of the dial.
label*stringNames the meter for screen readers.
captionstringA short line under the value.
format(value: number) => stringFormats values wherever the chart shows them. Defaults to short numbers like 12.4K.
colorstringAny CSS color for the lit ticks.
ticksnumberHow many tick marks make up the dial.
classNamestringMerged onto the root element.