Back to Components
Cards

Stat Card

Metric display card with value, label, optional icon, and change indicator.

Monthly recurring revenue

$0
vs previous period12.4%

Active workspaces

0
vs previous period3.2%

Conversion rate

4.2%
vs previous periodStable

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/stat-card.tsx

Installation

Using shadcn CLI

npx shadcn add stat-card --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge