# StatementNotes

> Numbered notes, referenced from the line they explain.

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

---

- **Family:** Statements — **The largest gap in the market.** Nothing else has these.
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/06-statements

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/statement-notes
```

## Specification

Numbered notes, each with a title, a body and an optional small table, plus `NoteRef`, the marker on a statement line that links to its note.

- **Every note is an anchor** (`note-3`, prefix configurable), reached with `scroll-margin` so a sticky header never covers it.
- **`NoteRef` is a real link with a real name**: visible "Note 3", accessible name "Note 3, Long-term debt". In print the underline goes and the number stays, because the number is how paper cross-references.
- **A note's table names its total; the component sums it.** A note can't print a total its own lines don't reach. One `null` line makes the total `n/a`, never a smaller total.
- The table follows the statement conventions: rules over the numeric columns only, single above the total and double below, parentheses for negatives, `—` for zero.
- **Print:** a note's heading never strands at a page foot (`break-after: avoid`), and its table never splits (`break-inside: avoid`).
- Server-safe. Two sets of notes on one page take different `idPrefix` values.

## 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.
