Milestone Timeline Stats
Timeline section listing a handful of milestones (a date, a short headline, and an associated stat) connected by a line. Renders as a horizontal row with a connecting line on desktop and collapses to a vertical, left-aligned list with a connecting line on mobile.
Docs
Installation
A real shadcn registry command, not a copy-paste stand-in: it fetches this block plus its badge dependencies and any missing npm packages, and installs them straight into your project.
npx shadcn add https://staaarter.com/r/milestone-timeline-stats.jsonPrefer not to use the CLI? Copy the source from the Code toggle above into src/components/blocks/stats/stats9.tsx instead.
Usage
The file also exports stats9Demo, 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 { Stats9, stats9Demo } from "@/components/blocks/stats/stats9"; export default function Page() { return <Stats9 {...stats9Demo} />; }
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| badge | { label: string; variant?: BadgeVariant } | none | Pill above the heading; only rendered when badge is truthy. |
| heading | string | undefined | Section heading. |
| description | string | undefined | Section intro text. |
| milestones | Milestone[] | none | Ordered list of milestones rendered along the timeline. |
| className | string | none | Extra classes for the outer section element. |
Types
type Milestone = { date: string; headline: string; stat: string; };
Behavior notes
- Two separate markup blocks are rendered for the timeline (one vertical list shown only below the sm breakpoint, one horizontal row shown only at sm and above); only one is visible at a time via Tailwind's responsive display utilities, there is no JS-driven layout switching.
- The connecting line is a plain absolutely-positioned div (a 1px bg-border bar), not an SVG path.
- milestones renders in whatever order the array is given; there is no date parsing or automatic sorting.
More Stats Blocks
View all →Simple Four Stat Row
A plain 4-column row of big numbers with labels, no icons or chrome.
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.