Back to Components
Display

Stat Widget

Compact metric display with value, label, trend indicator, and optional icon slot.

PropsUsage ExampleVariations

New signups

1,2848.4%

Since last period

Churn rate

2.1%1.6%

Since last period

Revenue today

$42.3k

Since last period

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/stat-widget.tsx

Installation

Using shadcn CLI

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

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge

Related Display Components