AnomalyCard
A flagged deviation with its explanation.
npx shadcn add @lopifi/anomaly-cardExamples
The same component, case by case. Each stage is the shipped code with the props it shows; switch to Code for the usage.
Wired actions
Approve, flag and create-a-rule are callbacks; the decision is recorded by your app, not the card.
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 flagged deviation, with the comparison that triggered it and one clear action (approve / flag / create rule). Never a bare alert. An anomaly without its baseline is noise.
API change: polarity is now required, no default (it previously defaulted to inverted). Spend anomalies pass inverted; a revenue or cash anomaly passes standard.
More in Cards
See also
Where this component is specified, defined and running.
Elsewhere in the system
The live section AnomalyCard renders in, the calculators behind its figures, and the ledger payloads that feed it.
- AnomalyCard, runningThe cards showcase — live, with theme, density, grayscale and reduced-motion switches.
- Benford & round numbersBenford and round-number tests that point at the rows to pull first.
- CardsAll cards: 24px radius, 24px inset, --surface on --canvas, 1px --border, no resting shadow. Specs for 11 React components: BalanceCard, KpiCard, AccountCard, PaymentMethodCard and 7 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 Cards changes
Your copy doesn’t update itself when we fix something here.
- One email when a Cards component needs a migration
- Nothing when nothing changes
Or install it now