VibeUI
ComponentsDocs
VibeUI

Components with taste, that you own. Copy the source, retint the tokens, keep every line.

Library

  • All components
  • Signature pieces
  • Text effects
  • Footers

Docs

  • Introduction
  • Installation
  • Theming
  • CLI

Project

  • GitHub
  • Agents and MCP
  • Issues
  • MIT license
© 2026 VibeUI · MIT licensed
  1. Components
  2. Data & surfaces
  3. Stat

Stat

Metric tile with a value and an optional trend delta.

Data & surfacesServer-safe

Components

178

12 this release

Bundle

0 kb

Copy-owned

Errors

0.4%

0.2% vs last week

Install

bash
npx @agents-npm-packages/vibeui add stat --dir ./src/components/ui

Import

tsx
import { Stat } from "@/components/ui/stat"

API

Generated from the component's TypeScript types, so it always matches the source. * marks a required prop.

<Stat>

PropTypeDefaultDescription
label*string—Visible label.
value*string—Controlled value.
deltastring—Change text shown under the value.
trend"neutral" | "down" | "up""neutral"Direction of the change: up, down or neutral.
classNamestring—Extra classes, merged with the component's own.

Source

src/components/ui/stat.tsx
import { ArrowDownRight, ArrowUpRight } from "@phosphor-icons/react/dist/ssr";
import { cn } from "@/lib/utils";

/** Metric tile with a value and an optional trend delta. */
export function Stat({
  label,
  value,
  delta,
  trend = "neutral",
  className,
}: {
  label: string;
  value: string;
  delta?: string;
  trend?: "up" | "down" | "neutral";
  className?: string;
}) {
  return (
    <div
      className={cn(
        "animate-fade-up rounded-lg border border-line bg-surface p-5 shadow-quiet transition-[transform,box-shadow,border-color] duration-300 ease-out hover:-translate-y-0.5 hover:border-line-strong hover:shadow-lift",
        className,
      )}
    >
      <p className="text-[13px] text-muted">{label}</p>
      <p className="mt-2 text-[28px] font-medium leading-none tracking-[-0.04em] text-ink tabular-nums">
        {value}
      </p>
      {delta ? (
        <p
          className={cn(
            "mt-3 inline-flex items-center gap-1 text-xs font-medium",
            trend === "up" && "text-pastel-sage-ink",
            trend === "down" && "text-pastel-rose-ink",
            trend === "neutral" && "text-muted",
          )}
        >
          {trend === "up" ? <ArrowUpRight size={12} weight="bold" /> : null}
          {trend === "down" ? <ArrowDownRight size={12} weight="bold" /> : null}
          {delta}
        </p>
      ) : null}
    </div>
  );
}

Exports Stat. Peer dependencies: clsx, tailwind-merge, @phosphor-icons/react.

PreviousSparklineNextTable