ScenarioCompare
Scenarios side by side, all measured against the base.
npx shadcn add @lopifi/scenario-compareExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
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.
Scenarios in columns, measures down, every column measured against the base. The comparison is declared, not positional, so it survives the reader reordering or hiding columns.
It won't rank the scenarios. No best-case styling, no sorting by outcome. A scenario is a set of assumptions, and calling the biggest number the good one turns a forecast review into a negotiation over which column the board sees.
It won't hide a breach. A measure with a limit (a covenant floor, a minimum cash balance) names, in words under the grid, the scenarios that cross it. A downside that breaches a covenant is the only thing on the page that matters, so it isn't left as a cell someone has to notice.
API change: ScenarioMeasure.polarity is now required, no default (it previously fell back to standard).
The accounting it encodes
The concepts this component renders, each defined once in the lexicon.
More in Metrics & analysis
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section ScenarioCompare renders in, the calculators behind its figures, and the ledger payloads that feed it.
- ScenarioCompare, runningThe metrics showcase — live, with theme, density, grayscale and reduced-motion switches.
- Build vs buy break-evenBuild a small tool or keep paying for one: the cost of each over your horizon and the month the build breaks even.
- Self-hosting vs SaaS costThe honest yearly cost of running open-source software yourself, set against the bill it replaces, with the seat count where it stops paying.
- Metrics & analysisMetrics & analysis — specs for 13 React components: MetricDefinition, NonGaapReconciliation, MrrBridge, BudgetVsActual and 9 more.
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 Metrics & analysis changes
Your copy doesn’t update itself when we fix something here.
- One email when a Metrics & analysis component needs a migration
- Nothing when nothing changes
Or install it now