Stats sections
The numbers that prove the product works: a quiet row under the hero, cards with a trend for each figure, or big numbers on the theme's colored band.
3 blocks below, each one file and one command. They wear whichever DressCode theme you install, in light and dark.
Row of figures
Four results in a hairline grid, each a big figure in the accent color with one line on what it means.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/stats-row.jsoncomponents/dresscode/stats-row.tsx
// Stats, row: four results in a hairline grid, each a big figure in the accent color and one line on
// what it means. It sits well under a hero or a logo cloud; the heading is there for screen readers.
// From the Orbit landing template. The numbers are sample content; replace them with your own.
const STATS = [
{ value: "11 days", label: "average time to get paid, down from 26" },
{ value: "3×", label: "fewer invoices paid late after the first month" },
{ value: "2 hours", label: "saved every week on chasing and bookkeeping" },
{ value: "30", label: "currencies, with payouts in your own" },
]
export default function StatsRow() {
return (
<section aria-labelledby="stats-row-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<h2 id="stats-row-title" className="sr-only">
Orbit in numbers
</h2>
<dl className="grid gap-px overflow-hidden rounded-[var(--dc-radius-card)] border border-border bg-border sm:grid-cols-2 lg:grid-cols-4">
{STATS.map((s) => (
<div key={s.value} className="flex flex-col-reverse justify-end bg-background p-7">
<dt className="mt-3 text-[15px] leading-snug text-muted-foreground">{s.label}</dt>
<dd className="dc-h dc-num text-[44px] leading-none text-[color:var(--dc-accent)]">{s.value}</dd>
</div>
))}
</dl>
</div>
</section>
)
}Cards with trends
A heading and four stat cards, each with a short caption, the change on last year and a small bar strip of the months behind it.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/stats-cards.jsoncomponents/dresscode/stats-cards.tsx
// Stats, cards with trends: a heading and four stat cards. Each card has its figure, the change on last
// year (a pill that says whether the change is good) and a strip of twelve bars for the months behind
// it, the latest in full color. The bars are a picture, hidden from screen readers; the caption and the
// change say what they show. The numbers are sample content; replace them with your own.
import { ArrowDownRight, ArrowRight, ArrowUpRight } from "lucide-react"
import { Button } from "@/components/ui/button"
import { cn } from "@/lib/utils"
type Stat = {
label: string
value: string
caption: string
change: string
/** Which way the figure moved; whether that is good is the pill's color, not the arrow. */
direction: "up" | "down"
good: boolean
bars: number[]
}
const STATS: Stat[] = [
{
label: "Paid through Orbit",
value: "$412M",
caption: "to 4,000 studios and freelancers",
change: "+34% on 2024",
direction: "up",
good: true,
bars: [22, 24, 23, 27, 29, 28, 31, 33, 32, 36, 38, 41],
},
{
label: "Days to get paid",
value: "11",
caption: "on average, down from 26",
change: "15 days faster",
direction: "down",
good: true,
bars: [26, 24, 21, 19, 18, 16, 15, 14, 13, 12, 12, 11],
},
{
label: "Paid on time",
value: "92%",
caption: "of invoices, with reminders on",
change: "+27 points",
direction: "up",
good: true,
bars: [65, 68, 70, 74, 77, 80, 82, 85, 87, 89, 90, 92],
},
{
label: "Invoices disputed",
value: "0.4%",
caption: "because every line is spelled out",
change: "−0.3 points",
direction: "down",
good: true,
bars: [0.7, 0.7, 0.6, 0.65, 0.6, 0.55, 0.5, 0.5, 0.45, 0.45, 0.42, 0.4],
},
]
function Bars({ values }: { values: number[] }) {
const max = Math.max(...values)
return (
<div aria-hidden="true" className="flex h-12 items-end gap-1">
{values.map((v, i) => (
<span
key={i}
className={cn(
"flex-1 rounded-t-[2px]",
i === values.length - 1 ? "bg-[color:var(--chart-1)]" : "bg-[color:color-mix(in_oklab,var(--chart-1)_28%,transparent)]",
)}
style={{ height: `${Math.max(12, (v / max) * 100)}%` }}
/>
))}
</div>
)
}
export default function StatsCards() {
return (
<section aria-labelledby="stats-cards-title" className="py-16 sm:py-24">
<div className="mx-auto w-full max-w-[1200px] px-5 sm:px-8">
<div className="flex flex-col gap-6 md:flex-row md:items-end md:justify-between">
<div className="max-w-[600px]">
<p className="text-sm font-semibold text-[color:var(--dc-accent)]">Orbit in 2025</p>
<h2 id="stats-cards-title" className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
What changes in the first year
</h2>
<p className="mt-4 text-[17px] leading-relaxed text-muted-foreground">
Medians across every studio and freelancer that sent at least ten invoices with Orbit last year.
</p>
</div>
<Button variant="link" className="dc-flat h-auto self-start px-0 text-[15px] font-semibold text-foreground md:self-auto" nativeButton={false} render={<a href="#report" />}>
Read the full report <ArrowRight className="size-4" aria-hidden="true" />
</Button>
</div>
<dl className="mt-12 grid gap-4 sm:mt-14 sm:grid-cols-2 lg:grid-cols-4">
{STATS.map((s) => {
const Arrow = s.direction === "up" ? ArrowUpRight : ArrowDownRight
return (
<div key={s.label} className="dc-card flex flex-col p-6">
<dt className="text-[14px] font-medium text-muted-foreground">{s.label}</dt>
<dd className="mt-3 flex flex-1 flex-col">
<span className="dc-h dc-num block text-[40px] leading-none">{s.value}</span>
<span className="mt-4 block">
<span className={cn("dc-pill", s.good ? "dc-pill-hl" : "dc-pill-danger")}>
<Arrow className="size-3.5" aria-hidden="true" />
{s.change}
</span>
</span>
<span className="mt-3 block text-[14px] leading-snug text-pretty text-muted-foreground">{s.caption}</span>
<div className="mt-auto pt-6">
<Bars values={s.bars} />
<div aria-hidden="true" className="mt-2 flex justify-between text-[11px] text-muted-foreground">
<span>Jan</span>
<span>Dec</span>
</div>
</div>
</dd>
</div>
)
})}
</dl>
</div>
</section>
)
}On the colored band
Big numbers on the theme's band color beside a heading, a line of copy and a link to the full report.
npx shadcn@latest add https://dresscodeui.com/r/dresscode/stats-band.jsoncomponents/dresscode/stats-band.tsx
// Stats on the colored band: a heading, a line of copy and a link to the report on the left, four big
// numbers on the right, all on the theme's band color (dc-band switches the text, the muted text, the
// lines and the buttons to the band's own pair). The numbers are sample content; replace them with your own.
import { ArrowRight } from "lucide-react"
import { Button } from "@/components/ui/button"
const STATS = [
{ value: "4,000", unit: "", label: "studios and freelancers send their invoices with Orbit" },
{ value: "$412", unit: "M", label: "paid to them through Orbit in 2025" },
{ value: "11", unit: "days", label: "to get paid on average, down from 26" },
{ value: "92", unit: "%", label: "of invoices paid on time with reminders on" },
]
export default function StatsBand() {
return (
<section aria-labelledby="stats-band-title" className="dc-band py-16 sm:py-24">
<div className="mx-auto grid w-full max-w-[1200px] gap-12 px-5 sm:px-8 lg:grid-cols-[minmax(0,1fr)_minmax(0,1.3fr)] lg:items-center lg:gap-20">
<div className="max-w-[520px]">
<p className="text-sm font-semibold opacity-80">Orbit in numbers</p>
<h2 id="stats-band-title" className="dc-h mt-3 text-[32px] leading-[1.1] sm:text-[42px]">
Small studios, paid two weeks sooner
</h2>
<p className="mt-4 text-[17px] leading-relaxed text-muted-foreground">
We looked at every invoice sent with Orbit last year. With reminders on, they were paid in half the time.
</p>
<Button
size="lg"
variant="outline"
className="mt-8 h-11 border-[color:var(--dc-band-edge)] bg-transparent px-5 text-[15px] font-semibold text-[color:var(--dc-band-fg)] hover:bg-[color:color-mix(in_oklab,var(--dc-band-fg)_12%,transparent)] hover:text-[color:var(--dc-band-fg)] dark:bg-transparent"
nativeButton={false}
render={<a href="#report" />}
>
Read the 2025 report <ArrowRight className="size-4" aria-hidden="true" />
</Button>
</div>
<dl className="grid grid-cols-2 gap-x-6 gap-y-10 sm:gap-x-10 sm:gap-y-12">
{STATS.map((s) => (
<div key={s.label} className="flex flex-col-reverse justify-end border-t border-border pt-5">
<dt className="mt-3 text-[15px] leading-snug text-pretty text-muted-foreground">{s.label}</dt>
<dd className="dc-h dc-num text-[44px] leading-none sm:text-[64px]">
{s.value}
{s.unit ? <span className={s.unit.length > 1 ? "ml-1.5 text-[0.45em]" : "text-[0.6em]"}>{s.unit}</span> : null}
</dd>
</div>
))}
</dl>
</div>
</section>
)
}