Panel

Display

Creates 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
NameTypeDefaultDescription
Appearance
BorderBoxBorderStyle of the panel border. See BoxBorder for available styles like Rounded, Square, and Double.
BorderColorColor?Color of the panel border. If null , uses default console color.
Heightint?Height of the panel in lines. If null or less than 1, height is automatically determined by content.
TitleColorColor?Color of the panel title. If null , uses default console color.
Widthint?Width of the panel in characters. If null or less than 1, width is automatically determined by content.
Common
ChildContentRenderFragmentRenders a panel with optional title, border, and padding using Spectre.Console's Panel renderable.
Titlestring?Title text displayed at the top of the panel border. If null or empty, no title is shown.
Other
ExpandboolWhether the panel should expand to fill available space. Default is false .
PaddingPadding?Padding inside the panel border as (left, top, right, bottom). If null , no padding is applied.

API