Grid
LayoutArranges children in a grid layout.
@using Spectre.Console
@using RazorConsole.Components
<Grid Columns="3">
<Markup Content="Cell 1.1" />
<Markup Content="Cell 1.2" />
<Markup Content="Cell 1.3" />
<Markup Content="Cell 2.1" />
<Markup Content="Cell 2.2" />
<Markup Content="Cell 2.3" />
</Grid>Parameters
4| Name | Type | Default | Description |
|---|---|---|---|
Appearance | |||
Width | Nullable<Int32> | — | Width of the grid in characters. If null , automatically determined by content. |
Common | |||
ChildContent | RenderFragment | — | Arranges content in a multi-column grid using Spectre.Console's Grid renderable. |
Other | |||
Columns | Int32 | — | Number of columns in the grid. Default is 2. Must be positive. |
Expand | Boolean | — | Whether the grid should expand to fill available space. Default is false . |