Gauge

Show a value against a known range.

npx shadcn@latest add @silicon-ui/gauge
datachart
Loading…

Installation

With the shadcn CLI

npx shadcn@latest add @silicon-ui/gauge

Manually

  1. Install the dependencies.

    npm install motion
  2. Copy these files into your project. Shared files are skipped if you already have them.

    • components/silicon-ui/gauge/gauge.tsx
    • components/silicon-ui/gauge/gauge.module.css
  3. Install the foundation once per app for the design and motion tokens: npx shadcn@latest add @silicon-ui/silicon-foundation

Usage

Source codetsx
import { Gauge } from "@/components/silicon-ui/gauge/gauge";

API reference

PropTypeDefault
value*number—
label*string—
minnumber0
maxnumber100
detailstring—
toneGaugeTone

"danger""success""warning""accent"

"accent"
thresholdsGaugeThreshold[]—

Dependencies

npm
motion
Registry
silicon-motion-tokens