FxGainLossPanel
Realized and unrealized never combined.
npx shadcn add @lopifi/fx-gain-loss-panelExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Realized gain, unrealized loss
Settlements made money while open balances lost it — two lines, because only one of them reverses.
Realized loss, unrealized gain
The opposite month: a loss locked in on settlement, a paper gain on what is still open.
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.
Realized and unrealized as separate lines, never combined. Unrealized reverses; realized doesn't. One number destroys the reader's ability to tell what happened.
More in Close, controls & consolidation
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section FxGainLossPanel renders in, the calculators behind its figures, and the ledger payloads that feed it.
- FxGainLossPanel, runningThe close showcase — live, with theme, density, grayscale and reduced-motion switches.
- FX conversion & gain/lossConvert at your policy rate and measure the FX gain or loss.
- Close, controls & consolidationConceptually they belong to this family. Specs for 24 React components: PeriodStatus, CutoffWarning, CloseStatus, AuditTrail and 20 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 Close, controls & consolidation changes
Your copy doesn’t update itself when we fix something here.
- One email when a Close, controls & consolidation component needs a migration
- Nothing when nothing changes
Or install it now