Back to Components
Components

Stat Comparison

Before and after comparison with trend indicator.

Monthly revenue

$54,200

Previous

$49,800

8.8%vs previous period

Active accounts

1,280

Previous

1,315

2.7%vs last week

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/stat-comparison.tsx

Installation

Using shadcn CLI

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

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge