Table

A scrollable data table with configurable columns, fixed widths, a row cursor and per-row/per-cell styling via a styleFunc. Handles more rows than fit by scrolling within a fixed height.

Install the package

Every component ships in the single dart_tui package.

$dart pub add dart_tui
table · dart_tui
Table demo

TableModel

PropertyTypeDescription
columnsList<TableColumn>Column definitions — each a (title, width).
rowsList<List<String>>Row data; one inner list per row.
cursorintIndex of the highlighted row.
heightintVisible rows before scrolling. Defaults to 10.
stylesTableStylesHeader style plus a styleFunc(row, col) for per-cell styling.

Keybindings

↑ / k, ↓ / jMove row cursor

Related