KQ-030 · LEDGER

Ledger

Ten thousand rows, sixty frames — a hand-rolled virtualized table where sorting FLIPs only the rows you can see and selection cascades down the window.

KQ-030 · LEDGER

10,000 ROWS · VIRTUALIZED

ID
Time

VISIBLE 18 OF 10,000

Install

One command — the source lands in your repo. Or copy it from the Code tab.

$ pnpm dlx shadcn@latest add @kinetiq/ledger

Props

PropTypeDefaultDescription
columns / rows / rowIdLedgerColumn<T>[] / readonly T[] / (row) => stringColumn defs (width px | "1fr", align, sortable, cell, sortFn), the full data set, and stable row identity.
rowHeight / height / overscannumber40 / 320 / 6Fixed row height, viewport height, and window padding.
sort / defaultSort / onSortChangeLedgerSort | nullControlled or uncontrolled; headers cycle asc → desc → none.
selectable / selected / onSelectedChangeboolean / ReadonlySet<string> / (next) => voidCheckbox column; select-all targets every row, not just visible.
onVisibleRangeChange({ from, to }) => void1-based visible range, emitted from the rAF scroll flush.