# ReportHeader

> Entity, statement, period, basis, currency, as-of. Every figure states its basis.

Source: https://lopifi.com/components/report-header
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/report-header
```

## Specification

The title block every statement and report carries: entity (or consolidated group), statement name, period or as-of date, basis, framework, presentation currency, scale, provenance, and the states that limit how far a reader may rely on it.

```
  Northwind Holdings, Inc. and subsidiaries         ← entity / consolidation scope
  Consolidated profit and loss                      ← statement name
  For the three months ended 30 Sep 2026            ← resolved period, or "As of" for a balance sheet
  Accrual basis · US GAAP · Presented in USD · In thousands, except per-share amounts
  Generated 2 Oct 2026, 09:12 UTC · Period closed · Xero
  [Draft] [Unaudited]                               ← states, in words
```

- **The period is a union, not a string.** `{ start, end }` resolves to "For the month ended…", "For the three months ended…", "For the year ended…"; `{ asOf }` resolves to "As of…". A balance sheet labeled with a month can't be written. Anything other than whole calendar months states both ends instead of guessing a name; `periodLabel` overrides for a 52/53-week year.
- **Scale is stated whenever it applies**, with "except per-share amounts" when asked, because per-share figures are never scaled.
- **States are words in a tint**: Draft, Provisional, Restated, Unaudited, printed in that order (least reliable first). They survive a grayscale print. A restated header names its reason beside the label.
- **`consolidated`** prefixes the statement name; the entity line still names the group.
- Server-safe, `forwardRef`, extends `<header>`. One heading holds entity and statement, so the accessible name is what the document is. `align="center"` for the printed convention, `size="compact"` inside a pack. Three sizes, two weights.
- Exports `reportPeriodLabel` and `reportScaleLabel`, so an export or a filename says the same thing the screen does.

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