Stats Card

An animated statistics card with trend indicators.

v0

Installation

Full Setup guide

Install the component automatically via Shadcn CLI.

npx shadcn@latest add https://www.grettech.com/api/registry/stats-card

Other Examples

Negative Trend

v0

Props

PropTypeDefaultDescription
className
string-Optional CSS classes to apply.
title
stringTotal RevenueThe stat title
value
number12345The main stat value
icon
ReactNode<Activity />Icon rendered in a circle on the right
trend
'up' | 'down'upDirection of the trend
trendValue
string+12%The trend percentage or string
gradient
stringfrom-[oklch(0.65_0.25_270)] to-[oklch(0.55_0.2_300)]Tailwind gradient class for background
description
string-A short description below the value
variant
"default" | "destructive" | "success" | "blue""default"The visual variant of the stats card.
...props
React.HTMLAttributes<HTMLDivElement>-Accepts all standard HTML attributes (id, style, etc).