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.jsonPrefer 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
| Prop | Type | Default | Description |
|---|---|---|---|
| heading | string | undefined | Optional heading above the stat row. |
| description | string | undefined | Optional supporting text under the heading. |
| stats | StatItem[] | none | The stat entries rendered in the row. |
| className | string | none | Extra 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.
More Stats Blocks
View all →Stats With Icons
Bordered stat tiles, each topped with a lucide icon above the number.
Big Hero Stat
One dominant, oversized stat with smaller supporting stats below it.
Stats With Progress Bars
A vertical list of stats, each paired with a horizontal progress bar toward a goal.
Animated Counter Row
A 4-stat row whose numbers count up from 0 on mount.
Dashboard Style Grid
A dense analytics-dashboard grid with trend deltas and inline sparklines.
Before After Comparison
Two-column before/after comparison of the same metrics, with the after column highlighted to signal improvement.