Class Table
Tiny aligned-column table renderer. Box-drawing borders by default, header in bold, optional foreground colors for header and borders. One column auto-resizes to its widest cell — no manual width configuration. Single-line cells only.
public static class Table
- Inheritance
-
Table
- Inherited Members
Remarks
Deliberately small surface: no row borders between body rows, no
alignment options (always left), no multi-line cells, no col-spans,
no live updates. If you need any of that, reach for
Spectre.Console.
Methods
Print(string[]?, string[][], TableBorder, Color?, Color?)
Render a table to Out.
public static void Print(string[]? headers, string[][] rows, TableBorder border = TableBorder.Box, Color? headerColor = null, Color? borderColor = null)
Parameters
headersstring[]Header labels.
nullor empty for a header-less table.rowsstring[][]Data rows. Rows shorter than the header are right-padded with empty cells.
borderTableBorderBorder style. Defaults to full Box.
headerColorColor?Optional foreground for the header row. Header is also rendered bold.
borderColorColor?Optional foreground for the border glyphs (only meaningful with Box).