niceui

Stat Card

A KPI card with label, value, delta and an inline sparkline generated from your data points.

ReactTailwind CSSTypeScriptData displayMIT · Free
Monthly revenue+12.4%
$48,290

Installation

01

Install with the shadcn CLI.

$ npx shadcn@latest add https://niceui.dev/r/stat-card.json
02

Or copy the source manually into components/ui/stat-card.tsx. No extra dependencies.

Usage

import { StatCard } from "@/components/ui/stat-card";

export default function Example() {
  return (
    <StatCard
      label="Monthly revenue"
      value="$48,290"
      delta="+12.4%"
      trend={[4, 8, 6, 14, 12, 20, 18, 26, 24]}
    />
  );
}

For AI assistants

This page is also available as Markdown and as a shadcn registry item. Use Copy prompt to hand the full source to Claude, Cursor or v0.