Skip to content
New

Stats, numbers

beta

A title and two to four large numbers that roll into place when scrolled into view, with their source.

npx rasengan-ui add stats-numbers

Studios get paid nine days sooner

Reminders that go out on time, and payment links in every invoice, add up.

Invoices sent
1.8M
Paid on time
94%
Collected
$312M
Days to get paid
6

Senbon customers, January to October 2026.

Use it
Proving a claim with a few real numbers: customers, uptime, money saved.
Avoid it
Numbers you cannot source, or more than four of them.
Built with
Number Roll

Installation

Terminal
npx rasengan-ui add stats-numbers

It installs into components/blocks/stats-numbers/, with what it uses (Number roll) and lib/blocks.ts.

Usage

Without content, the block shows its example. Pass your own, typed by the block's schema, from a content file (here, the example with one field changed):

app/_routes/index.page.tsx
import { StatsNumbers } from "@/components/blocks/stats-numbers";
import { home } from "@/content/home";
 
export default function Home() {
  return <StatsNumbers content={home.stats} />;
}
content/home.ts
import { example, type StatsNumbersContent } from "@/components/blocks/stats-numbers";
 
export const home = {
  stats: {
    ...example,
    title: "Your section title",
  } satisfies StatsNumbersContent,
};

format is number, percent (0.94 is 94%), currency (with currency) or compact; locale sets how numbers read.

Content

FieldTypeLimitsGuidance
titlestring8–70 charsWhat the numbers prove: 'Studios get paid nine days sooner'.
sublineoptionalstring≤ 180 chars
statsobject[]2–4 itemsReal, sourced numbers. Two to four; they roll into place when scrolled into view.
stats[].labelstring1–32 chars
stats[].valuenumber
stats[].formatoptional"number" | "percent" | "currency" | "compact"default "number"'percent' takes 0.97 for 97%.
stats[].currencyoptionalstring3–3 charsWith format 'currency'.
localeoptionalstringA BCP 47 locale for the numbers ('fr-FR'); the page's language when left out.
sourceoptionalstring≤ 120 charsWhere the numbers come from and when: 'Senbon customers, 2026'.

Props

PropNotes
contentStatsNumbersContent; the example when left out
idthe section's id, for anchor links; "stats" by default
headingLevel1, 2 or 3: the heading's tag; 2 by default
classNameon the root element, for spacing

Accessibility

  • The numbers are a description list: each label (dt) with its value (dd).
  • Values are in the server's HTML; NumberRoll rolls them in view and leaves them still with motion off.