Panel
DisplayCreates a bordered panel with optional title.
@using Spectre.Console
@using RazorConsole.Components
<Panel Title="Information" BorderColor="Color.Blue" Expand="true">
<Markup Content="Panel content here" />
</Panel>Parameters
9| Name | Type | Default | Description |
|---|---|---|---|
Appearance | |||
Border | BoxBorder | — | Style of the panel border. See BoxBorder for available styles like Rounded, Square, and Double. |
BorderColor | Color? | — | Color of the panel border. If null , uses default console color. |
Height | int? | — | Height of the panel in lines. If null or less than 1, height is automatically determined by content. |
TitleColor | Color? | — | Color of the panel title. If null , uses default console color. |
Width | int? | — | Width of the panel in characters. If null or less than 1, width is automatically determined by content. |
Common | |||
ChildContent | RenderFragment | — | Renders a panel with optional title, border, and padding using Spectre.Console's Panel renderable. |
Title | string? | — | Title text displayed at the top of the panel border. If null or empty, no title is shown. |
Other | |||
Expand | bool | — | Whether the panel should expand to fill available space. Default is false . |
Padding | Padding? | — | Padding inside the panel border as (left, top, right, bottom). If null , no padding is applied. |