# ColumnHeader

> The sortable, draggable header cell.

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

---

- **Family:** Ledger & tables — 
- **Status:** Implemented
- **Spec:** https://lopifi.com/docs/catalog/05-ledger-tables

## Install

```bash
npx shadcn@latest add @lopifi/theme
npx shadcn@latest add @lopifi/column-header
```

## Specification

The same two behaviours for a table that renders its own rows — `TransactionTable` uses
it. The sort control is a real `<button>` inside the cell rather than a handler on the
`<th>`, because the resize handle beside it needs its own focus stop; `aria-sort` stays
on the `<th>`, where a screen reader looks for it. The direction chevron always occupies
its space — a glyph that arrives on sort shifts the label sideways on every click of the
column the eye is trying to read.

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