class RatatuiRuby::Widgets::Table

Displays structured data in rows and columns.

Data is often multidimensional. You need to show relationships between fields (Name, Age, ID). Aligning columns manually in a monospaced environment is painful and error-prone.

This widget creates a grid. It enforces column widths using constraints. It renders headers, rows, and footers aligned perfectly.

Use it to display database records, logs, or file lists.

Example

Run the interactive demo from the terminal:

ruby examples/widget_table/app.rb