Copy a prompt for your AI coding tool with the source, dependencies and usage
Props
StatCardProps
Also accepts all props of React.ComponentProps<"div">
| Prop | Type | Default | Description |
|---|---|---|---|
| label* required | string | — | — |
| value* required | string | — | — |
| change* required | number | — | Percentage change vs. the previous period, e.g. 12.5 or -3.2 |
| caption | string | — | — |
| data* required | number[] | — | Sparkline data points, oldest first |
| invertTrend | boolean | false | When true, a negative change is shown as good (e.g. churn, latency) |
Install
$ npx shadcn@latest add https://chromotion.dev/r/stat-card.jsonThe CLI installs the base component; your customizations live in the code generated on the Customize tab.