Stats, numbers
betaA 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
- Pairs with
- Testimonials, carouselPricing, plans
Installation
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):
format is number, percent (0.94 is 94%), currency (with currency) or compact; locale sets how numbers read.
Content
| Field | Type | Limits | Guidance |
|---|---|---|---|
title | string | 8–70 chars | What the numbers prove: 'Studios get paid nine days sooner'. |
sublineoptional | string | ≤ 180 chars | |
stats | object[] | 2–4 items | Real, sourced numbers. Two to four; they roll into place when scrolled into view. |
stats[].label | string | 1–32 chars | |
stats[].value | number | ||
stats[].formatoptional | "number" | "percent" | "currency" | "compact" | default "number" | 'percent' takes 0.97 for 97%. |
stats[].currencyoptional | string | 3–3 chars | With format 'currency'. |
localeoptional | string | A BCP 47 locale for the numbers ('fr-FR'); the page's language when left out. | |
sourceoptional | string | ≤ 120 chars | Where the numbers come from and when: 'Senbon customers, 2026'. |
Props
| Prop | Notes |
|---|---|
content | StatsNumbersContent; the example when left out |
id | the section's id, for anchor links; "stats" by default |
headingLevel | 1, 2 or 3: the heading's tag; 2 by default |
className | on 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.