---
title: "Metric Card | Free React & Tailwind Blocks Component | Motion UI"
canonical: "https://blacknest.dev/motion/c/blocks/metric-card"
github_source: "https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/metric-card.tsx"
install_command: "npx motion-ui-skill add metric-card"
dependencies: ["clsx","lucide-react","motion","react","tailwind-merge"]
category: "blocks"
subcategory: "motion"
---

# Metric Card

> KPI stat card with animated SVG sparkline charts, positive/negative delta badges, and full multi-style preset support (`minimal`, `origin`, `enterprise`, `glow`, `ios`, `brutalist`). Inspired by Origin UI (Coss), KeenThemes ReUI, and ibelick.

## Install

```bash
npx motion-ui-skill add metric-card

# Or install with a specific style preset:
npx motion-ui-skill add metric-card --style origin
```

## Dependencies

- `clsx`
- `lucide-react`
- `motion`
- `react`
- `tailwind-merge`

## Usage

```tsx
"use client";

import { MetricCard } from "@/components/motion/metric-card";

export function MetricCardExample() {
  return (
    <div className="grid grid-cols-1 sm:grid-cols-3 gap-4 p-8">
      <MetricCard
        title="Total Revenue"
        value="$124,592"
        change="+12.4%"
        isPositive={true}
        stylePreset="origin"
      />
      <MetricCard
        title="Active Subscriptions"
        value="1,429"
        change="+8.1%"
        isPositive={true}
        stylePreset="enterprise"
      />
      <MetricCard
        title="Churn Rate"
        value="2.14%"
        change="-0.4%"
        isPositive={true}
        stylePreset="glow"
      />
    </div>
  );
}
```

## Props

| Prop | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `title` | `string` | Required | Metric header label. |
| `value` | `string \| number` | Required | Main KPI numerical/currency value. |
| `change` | `string` | `undefined` | Delta percentage or indicator text (e.g. `"+12.4%"`). |
| `isPositive` | `boolean` | `true` | Changes badge color between emerald and rose. |
| `timeframe` | `string` | `"vs last month"` | Subtitle timeframe text. |
| `sparklineData` | `number[]` | Default array | Array of numerical data points rendered into SVG trend line. |
| `stylePreset` | `"minimal" \| "origin" \| "enterprise" \| "glow" \| "ios" \| "brutalist"` | `"origin"` | Selected design system aesthetic preset. |
| `className` | `string` | `undefined` | Container classes. |

## Source Files

- [components/motion/metric-card.tsx](https://github.com/Rkj0123/motion-ui-skill/blob/main/components/motion/metric-card.tsx)
- [lib/ease.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/ease.ts)
- [lib/styles.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/styles.ts)
- [lib/utils.ts](https://github.com/Rkj0123/motion-ui-skill/blob/main/lib/utils.ts)
