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-card
Loading 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

PropTypeDefaultDescription
classNamestring—
deltanumber—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.
iconComponentType<{ className?: string }>—
labelstring—
loadingboolean—
valuenumber | string—