Gauge
Show a value against a known range.
npx shadcn@latest add @silicon-ui/gaugeInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/gaugeManually
Install the dependencies
npm install motionCopy these files into your project
- components/silicon-ui/gauge/gauge.tsx
- components/silicon-ui/gauge/gauge.module.css
Add the foundation, once per app, for the design and motion tokens
npx shadcn@latest add @silicon-ui/silicon-foundation
Usage
API reference
| Prop | Type | Default |
|---|---|---|
value* | number | — |
label* | string | — |
min | number | 0 |
max | number | 100 |
detail | string | — |
tone | GaugeTone
| "accent" |
thresholds | GaugeThreshold[] | — |
Dependencies
- npm
- motion
- Registry
- silicon-motion-tokens