Table
data
Table: renders tabular data with columns, headers, and optional zebra-striping
Terminal
$termuijs render table
Installation
$ bunx termuijs add table
Copies the source into src/components/table/ and installs @termuijs/core, @termuijs/widgets.
Usage
ts
import { Table } from '@termuijs/widgets'ts
new Table(columnsOrProps: TableColumn[] | TableProps, rows: TableRow[] = [], style: Partial<Style> = {}, options: TableOptions = {},)API Reference
Table
| Prop | Type | Required | Description |
|---|---|---|---|
columns | TableColumn[] | required | — |
rows | TableRow[] | optional | — |
style | Partial<Style> | optional | — |
options | TableOptions | optional | — |
state | TableState | optional | External state object – if provided, Table syncs rows through it |
onStateChange | (state: TableState) => void | optional | Called whenever rows change via setRows |