Staaarter

Simple Four Stat Row

The most basic stats pattern: a 4-column row on desktop (2-column on mobile) where each item is just a large number and a short label underneath. An optional heading and description sit above the row.

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/simple-four-stat-row.json

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

Usage

The file also exports stats1Demo, 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 { Stats1, stats1Demo } from "@/components/blocks/stats/stats1";

export default function Page() {
  return <Stats1 {...stats1Demo} />;
}

Props

PropTypeDefaultDescription
headingstringundefinedOptional heading above the stat row.
descriptionstringundefinedOptional supporting text under the heading.
statsStatItem[]noneThe stat entries rendered in the row.
classNamestringnoneExtra classes for the outer section element.

Types

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

Behavior notes

  • Fully static: there is no animation, count-up, or interactivity anywhere in this block.
  • The heading/description block only renders when at least one of the two is set; the stat row's top margin adjusts accordingly so it doesn't leave a gap when both are omitted.
  • The grid is a fixed 2-column (mobile) / 4-column (desktop) layout regardless of how many stats are passed in; five or more items wrap to additional rows rather than reflowing column count.