Stat Card

Displays statistical information using an icon, an animated numerical value, and a descriptive label.

0min
Installation Time

Usage

import {  StatCard,  StatCardContent,  StatCardIcon,  StatCardLabel,  StatCardNumber,} from "@/app/_components/ui/stat-card";
<StatCard>  <StatCardContent>    <StatCardIcon icon={Hourglass} />    <StatCardNumber value={5} suffix="min" />    <StatCardLabel>Stat Card Label</StatCardLabel>  </StatCardContent></StatCard>

Props

StatCard

NameTypeDefaultDescription
childrenReactNode-The content to be displayed.
classNamestring-Additional classes.

StatCardContent

NameTypeDefaultDescription
childrenReactNode-The content to be displayed.
classNamestring-Additional classes.

StatCardIcon

NameTypeDefaultDescription
classNamestring-Additional classes.
icon*LucideIcon-The icon to be displayed.

StatCardLabel

NameTypeDefaultDescription
childrenReactNode-The content to be displayed.
classNamestring-Additional classes.

StatCardNumber

NameTypeDefaultDescription
value*number-The numerical value to display.
suffixstring-The suffix to display after the numerical value.
durationnumber2The duration of the animation in seconds.
decimalsnumber0The number of decimals to display.