Spectre.Console
Apparence
Links
Markup
AnsiConsole.MarkupLine("[green]One[/] [underline green]Two[/] [bold green]Three[/]");
// background
AnsiConsole.MarkupLine("[default on blue]One[/] [bold yellow on blue]Two[/]");
var message = "One";
AnsiConsole.MarkupLineInterpolated($"[red]{message}[/]");
|
Text prompt
if (!AnsiConsole.Confirm("Do you want to continue?")) // Do you want to continue? [y/n] (y): _
if (!AnsiConsole.Confirm("Do you want to quit?", false)) // Do you want to quit? [y/n] (n): _
var password = AnsiConsole.Prompt(
new TextPrompt<string>("Enter password: ")
.PromptStyle("blue")
.Secret());
|
Installation
dotnet add package Spectre.Console |