Black Friday: 30% off Pro

Get 30% off

Updated

Gauge Dial

Preview

CPU load
Elevated
68% used

Customize

Value68
Target80
Accent

Installation

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

Usage

import { GaugeDial } from "@/components/uibrik/gauge-dial/gauge-dial";​<GaugeDial  title="CPU load"  value={68}  unit="% used"  target={80}  showZone  interactive  accent=""  min={0}  max={100}  step={1}  format={{}}  onChange={(value) => {}}  // zones={[{ to: 0, label: "…", status: "good" }]}/>

Where to use Gauge Dial

  • Targets and thresholds

    A 240-degree dial with a spring-driven knob makes setting a value feel physical.

    Pairs with Gauge

  • Smart-home controls

    Lit ticks and a zone badge suit thermostats, fans and other device settings.

    Pairs with Tactile Toggle

  • Budget limits

    Dragging or using arrow keys sets a cap precisely while the zone shows if it is safe.

Props

GaugeDial
title
Type string
"CPU load"
Names what is measured.
value
Type number
68
Current value. The dial follows it with a spring.
unit
Type string
"% used"
Small caption under the number.
target
Type number
80
A level to aim for, marked outside the arc.
showZone
Type boolean
true
Names the zone the value is in, in the card's corner.
interactive
Type boolean
true
Drag the knob or use the arrow keys.
accent
Type string
""
Arc colour. Empty uses the chart palette.
min
Type number
0
Value at the start of the sweep.
max
Type number
100
Value at the end of the sweep.
zones
Type { to: number; label: string; status: "good" | "warning" | "critical" }[]
–
Named ranges, in order. Empty uses healthy, elevated and critical at 60% and 85% of the range.
step
Type number
1
Snap size when dragging or using the keyboard.
format
Type Intl.NumberFormatOptions
{}
Formats the number.
onChange
Type (value: number) => void
–
Called as the value changes by drag or keyboard.
className
Type string
–
Classes for the outer shell.