Staaarter

Stats With Description

Two-column stats section: a heading and a couple sentences of context on one side, and a 2x2 grid of stat values with short descriptions on the other. Useful for an about-style page section where the numbers need a sentence of framing rather than standing alone.

By Staaarter Team
Stats
Docs
Live preview

Docs

Installation

A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its dependencies and any missing npm packages, and installs them straight into your project.

npx shadcn add https://staaarter.com/r/stats-with-description.json

Prefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/stats/stats13.tsx instead.

Usage

The file also exports stats13Demo, the exact props behind the preview above. Spread it to get a working section in one line, then replace it with your own data.

import { Stats13, stats13Demo } from "@/components/blocks/stats/stats13";

export default function Page() {
  return <Stats13 {...stats13Demo} />;
}

Props

PropTypeDefaultDescription
eyebrowstringundefinedSmall label above the heading.
headingstringnoneSection heading in the text column.
paragraphstringnoneNarrative paragraph giving context for the stats.
statsStatItem[]noneStat tiles rendered in a 2x2 grid.
classNamestringnoneExtra classes for the outer section element.

Types

type StatItem = {
  label: string;
  value: string;
  description?: string;
};

Behavior notes

  • Purely presentational: there is no count-up or scroll animation on the stat values, they render at their final value immediately.
  • The stats grid is a fixed 2-column layout regardless of item count; supplying more than 4 stats wraps to additional rows rather than reflowing to more columns.
  • The text column and stats column are independent and both always render; there is no conditional collapse when one side has less content.