Metric card
A compact summary for a number that needs context.
npx shadcn@latest add @silicon-ui/metric-cardInstallation
With the shadcn CLI
npx shadcn@latest add @silicon-ui/metric-cardManually
Install the dependencies
npm install motionCopy these files into your project
- components/silicon-ui/metric-card/metric-card.tsx
- components/silicon-ui/metric-card/metric-card.module.css
Shared with other components. Skip any you already have.
- components/silicon-ui/animated-counter/animated-counter.tsx
- components/silicon-ui/animated-counter/animated-counter.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 |
|---|---|---|
label* | string | — |
value* | number | — |
context* | string | — |
suffix | string | — |
change | string | — |
Dependencies
- npm
- motion
- Registry
- silicon-motion-tokensanimated-counter