class RatatuiRuby::Layout::Layout

Divides an area into smaller chunks.

Terminal screens vary in size. Hardcoded positions break when the window resizes. You need a way to organize space dynamically.

This class manages geometry. It splits a given area into multiple sections based on a list of constraints.

Use layouts to build responsive grids. Stack sections vertically for a sidebar-main structure. Partition them horizontally for headers and footers. Let the layout engine do the math.

Example

Run the interactive demo from the terminal:

ruby examples/widget_layout_split/app.rb