MetricCard
A headline number with the change since the last period, all of it given to the card as props: it fetches nothing. delta is a ratio, so 0.05 reads as 5.0%. It ships in the base @chelone/react and @chelone/vue packages and needs no chart library.
Installation
pnpm dlx shadcn@latest add @chelone/metric-cardLoading preview…
A headline number with the change since the last period, all of it given to the card as props: it fetches nothing. delta is a ratio, so 0.05 reads as 5.0%. It ships in the base @chelone/react and @chelone/vue packages and needs no chart library.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| className | string | — | |
| delta | number | — | A ratio: 0.05 is 5.0%. Nothing renders for `undefined` or a non-finite number. |
| format | (value: number) => string | — | Applies to a numeric `value` only. |
| icon | ComponentType<{ className?: string }> | — | |
| label | string | — | |
| loading | boolean | — | |
| value | number | string | — |