Skip to content

Stat

Shows a labeled metric with supporting details.

Active projects

24

Up 3 from last month

stat-demo.tsx

Installation

The CLI adds the files, packages, theme variables, and Tailwind plugin that this component uses. Before you run it, set up your project.

Composition

  • StatGroupOptional
    • StatRepeats
      • StatIconOptional
      • StatLabel
      • StatValue
      • StatDetailOptional
        • StatTrendOptional

Trend

Include a plus or minus sign so the direction does not depend on color. Set invert when a lower value is better.

Revenue

$48,200

+12%From last month

Active users

9,630

−3%From last month

Churn rate

1.8%

−0.4 ptFrom last month

stat-trend-demo.tsx

Group

StatGroup joins stats in one surface. The columns wrap on narrow screens.

Revenue

$48.2k

+12%

Orders

1,284

+8%

Customers

9,630

0%

Response time

1.4 h

−22 min

stat-group-demo.tsx

Live value

Also install Animated number.

Visitors online

1,284

Updates every few seconds

stat-live-demo.tsx

API reference

StatTrend

direction: "up" | "down" | "neutral"Required
Sets the arrow.
invert: boolean = false
Shows a fall as good and a rise as bad. Use it for values such as churn or response time.