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

columns / rows / rowId
LedgerColumn<T>[] / readonly T[] / (row) => string
default
Column defs (width px | "1fr", align, sortable, cell, sortFn), the full data set, and stable row identity.
rowHeight / height / overscan
number
default 40 / 320 / 6
Fixed row height, viewport height, and window padding.
sort / defaultSort / onSortChange
LedgerSort | null
default
Controlled or uncontrolled; headers cycle asc → desc → none.
selectable / selected / onSelectedChange
boolean / ReadonlySet<string> / (next) => void
default
Checkbox column; select-all targets every row, not just visible.
onVisibleRangeChange
({ from, to }) => void
default
1-based visible range, emitted from the rAF scroll flush.