Figure
A large display numeral with automatic size step-down.
npx shadcn add @lopifi/figureExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Other currencies
The headline number honors the currency's exponent the same way every inline amount does.
Negative, unknown, redacted
A loss keeps its sign, an unknown reads n/a, a redacted figure never speaks its amount.
How it behaves
What it renders, what it refuses to render, and why. The same paragraphs as the family spec, so the two can’t disagree.
A large display numeral. The only place a figure may leave the figure face.
<Figure value={{ amount: 24819024, currency: "USD" }} size="hero" family="display" />
The step-down: at hero (40px), a value exceeding a character threshold steps to lg (28px), then md (20px). A container query on character count drives it, not clamp(), so the value always lands on a type-scale token rather than between two.
The display gate: family="display" is only valid when the component is provably solitary. In KpiRow, where figures align across cards, the prop is ignored and the figure face is forced. The parent enforces this; don't trust the caller.
Never truncates. Escalation ladder in numerics.
More in Primitives
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section Figure renders in, the calculators behind its figures, and the ledger payloads that feed it.
Components are copied into your repository and meant to be edited. Rounding policy, fiscal calendar and compliance copy differ per company.
Release notes
Get an email when Primitives changes
Your copy doesn’t update itself when we fix something here.
- One email when a Primitives component needs a migration
- Nothing when nothing changes
Or install it now