Back to Components
Components

Metric Trend

Metric display with trend line visualization and period comparison label.

Page Views

124,892

8.3%

vs last week

Bounce Rate

32.4%

2.1%

vs last month

Dependencies

  • clsx
  • tailwind-merge

Files

  • components/ui/metric-trend.tsx

Installation

Using shadcn CLI

npx shadcn add metric-trend --url https://ui.hampton.io

Manual installation

Copy the component file to your project and install dependencies:

npm install clsx tailwind-merge