: Use newline characters ( \n ) to generate text across multiple lines. var multiLine = new Text("First line\nSecond line"); Use code with caution. Copied to clipboard
: Create a basic string to display within your menu.
: Add colors or formatting by passing a Style object to the constructor.
: Align your generated text (Left, Center, or Right) to fit the layout of your menu. var aligned = new Text("Centered Content").Centered(); Use code with caution. Copied to clipboard Advanced Usage in Prompts
var styled = new Text("Styled Text", new Style(foreground: Color.Blue)); AnsiConsole.Write(styled); Use code with caution. Copied to clipboard
: Use newline characters ( \n ) to generate text across multiple lines. var multiLine = new Text("First line\nSecond line"); Use code with caution. Copied to clipboard
: Create a basic string to display within your menu. Spectre Menu v1.2
: Add colors or formatting by passing a Style object to the constructor. : Use newline characters ( \n ) to
: Align your generated text (Left, Center, or Right) to fit the layout of your menu. var aligned = new Text("Centered Content").Centered(); Use code with caution. Copied to clipboard Advanced Usage in Prompts new Style(foreground: Color.Blue))
var styled = new Text("Styled Text", new Style(foreground: Color.Blue)); AnsiConsole.Write(styled); Use code with caution. Copied to clipboard