# ScenarioCompare

> Scenarios side by side, all measured against the base.

Source: https://lopifi.com/components/scenario-compare
Part of: Lopifi — US GAAP books on autopilot, reviewed by a CPA (https://lopifi.com)

---

- **Family:** Metrics & analysis — ---
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/13-metrics-and-analysis

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/scenario-compare
```

## Specification

Scenarios in columns, measures down, every column measured against the base — the comparison is
declared rather than positional, so it survives the reader reordering or hiding columns.

**It will not rank the scenarios.** No best-case styling, no sorting by outcome. A scenario is a
set of assumptions, and presenting the largest number as the good one is how a forecast review
becomes a negotiation about which column to show the board.

**It will not hide a breach.** A measure carrying a limit — a covenant floor, a minimum cash
balance — names the scenarios that cross it in words under the grid. A downside that breaches a
covenant is the only thing on the page that matters, and it is not left as a cell someone has to
notice.

## Rules this component obeys

Money is minor units, never floats. `null` is not `0` and neither is redacted. Negatives render in accounting parentheses with the parenthesis column reserved on both sides. Debit and credit are two columns. Per-currency decimal places. Polarity is explicit — up is not always good. Every figure states its period, entity, currency, basis and as-of.
