ConsoleAppVisuals 3.0.7

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package ConsoleAppVisuals --version 3.0.7
                    
NuGet\Install-Package ConsoleAppVisuals -Version 3.0.7
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="ConsoleAppVisuals" Version="3.0.7" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="ConsoleAppVisuals" Version="3.0.7" />
                    
Directory.Packages.props
<PackageReference Include="ConsoleAppVisuals" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add ConsoleAppVisuals --version 3.0.7
                    
#r "nuget: ConsoleAppVisuals, 3.0.7"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package ConsoleAppVisuals@3.0.7
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=ConsoleAppVisuals&version=3.0.7
                    
Install as a Cake Addin
#tool nuget:?package=ConsoleAppVisuals&version=3.0.7
                    
Install as a Cake Tool

ConsoleAppVisuals

User-friendly .NET visuals library designed for console apps

version NuGet GitHub Coverage StatusLicense: GNU GPL

title

Install

Install the library using the .NET CLI:

dotnet add package ConsoleAppVisuals

Or for Visual Studio users, you can install the library using the NuGet Package Manager:

Install-Package ConsoleAppVisuals

First steps into the library

If you have been using the library before v3, please note that the library has been completely rewritten. The old version is not compatible with the new one. Please take the time to explore our documentation to update your code.

Principle

The library is designed to be user-friendly and easy to use. It is based on the concept of "visuals" which are elements that can be displayed in the console. There are two types of visuals:

  • Static visuals: elements that do not change by themselves, you may display several from the same type at the same time
  • Interactive visuals: elements that can be updated and create a response that can be collected, you may display only one at a time

These visuals are stored in Window as a list. From this class, you can display the visuals, add, remove, or update them. Each one of the visual element has its rendering method that lets the Window display it.

The basics of the interaction between the library and the console are defined in the Core class.

Use flow

After installing the library, do not forget to add the following statement at the beginning of your file:

using ConsoleAppVisuals;
Work with static elements

The first step is to create an element to display. For example, let's create a Title element:

Title exampleTitle = new Title("Hello, world!");

Then, you can add it to Window:

Window.AddElement(exampleTitle);

Finally, you can display the Window:

Window.Refresh();

Now at each refresh, the Title element will appear on screen. To disable it, you may choose one of these options:

// Will look for a Title element and deactivate it, the first on the list
Window.DeactivateElement<Title>();

// Will deactivate the exampleTitle element
Window.DeactivateElement(exampleTitle);

Or simply remove it from the list:

Window.RemoveElement<Title>();
Window.RemoveElement(exampleTitle);
Work with interactive elements

The process is similar to the static elements. The difference is that you can get a response from your interaction with these elements. Let's create a Prompt element:

Prompt examplePrompt = new Prompt("What is your name?", "Theo");

Then, you can add it to Window:

Window.AddElement(examplePrompt);

Finally, you can display the Window, remember that interactive element are disabled by default:

// Add this line if you have static elements to display
Window.Refresh();

Window.ActivateElement<Prompt>();

To get the response simply add:

var responsePrompt = Window.GetResponse<Prompt, string>();

Access to the response data using:

// Get the state of the response : Enter, Escape, or Backspace
Console.WriteLine(responsePrompt?.State);

// Get the response data, here a Prompt always return a string
Console.WriteLine(responsePrompt?.Info);

Getting the response from an interactive element will automatically deactivate it.

You may now remove the element from the list if you want to:

Window.RemoveElement<Prompt>();

Documentation

Feel free to check out the following resources to help you get started:

Roadmap

The library is still in development and we are working on the following features:

  • Add a new visual: the TableSelector
  • Add colorization to TableSelector (highligth data according to a condition)
  • Add example of a custom font in the example project
  • Add more default fonts
  • Add a new visual: the Chart

Supported dotnet versions

Version Supported
8.x
7.x
6.x
< 6.x

Security Policy

Consider reading our security policy to know more about how we handle security issues and how to report them. You will also find the stable versions of the project.

Development team

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. To do so, follow the steps described in the CONTRIBUTING file.

License

Distributed under the GNU GPL v3.0 License. See LICENSE for more information.

Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.6.1 108 7/28/2025
3.6.0 178 5/5/2025
3.5.5 149 4/4/2025
3.5.4 161 11/15/2024
3.5.3 158 9/3/2024
3.5.2 226 4/20/2024
3.5.1 165 4/5/2024
3.5.0 155 4/2/2024
3.5.0-rc 132 4/2/2024
3.5.0-beta.1 101 3/28/2024
3.5.0-beta 126 3/27/2024
3.5.0-alpha 115 3/26/2024
3.4.0 168 3/23/2024
3.4.0-beta 132 3/22/2024
3.3.1 176 3/20/2024
3.3.0 190 3/16/2024
3.2.6 170 3/14/2024
3.2.5 149 3/14/2024
3.2.4 187 3/13/2024
3.2.3 178 3/7/2024
3.2.2 178 3/7/2024
3.2.1 154 3/7/2024
3.2.0 166 3/5/2024
3.1.3 163 3/4/2024
3.1.2 170 3/3/2024
3.1.1 193 3/2/2024
3.1.0 183 3/2/2024
3.0.8 155 2/29/2024
3.0.7 167 2/18/2024
3.0.6 170 2/17/2024
3.0.5 204 1/10/2024
3.0.4 174 1/7/2024
3.0.3 173 1/6/2024
3.0.2 196 1/2/2024
3.0.1 162 1/2/2024
3.0.0 172 1/1/2024
2.7.10 166 12/31/2023
2.7.9 147 12/30/2023
2.7.8 182 12/24/2023
2.7.7 150 12/17/2023
2.7.6 171 12/13/2023
2.7.5 182 12/13/2023
2.7.4 146 12/12/2023
2.7.3 163 12/12/2023
2.7.2 141 12/12/2023
2.7.1 129 12/12/2023
2.7.0 157 12/11/2023
2.6.2 150 12/11/2023
2.6.1 157 12/11/2023
2.6.0 168 12/11/2023
2.5.2 157 12/9/2023
2.5.1 180 12/8/2023
2.5.0 132 12/8/2023
2.4.4 142 12/6/2023
2.4.3 202 11/23/2023
2.4.2 151 11/23/2023
2.4.1 144 11/23/2023
2.3.0 156 11/21/2023
2.2.5 158 11/21/2023
2.2.4 171 11/21/2023
2.2.3 146 11/21/2023
2.2.2 153 11/21/2023
2.2.1 153 11/21/2023
2.2.0 177 11/21/2023
2.1.0 181 11/15/2023
2.0.4 133 11/13/2023
2.0.3 202 10/19/2023
2.0.2 175 10/19/2023
2.0.0 162 10/18/2023
1.0.5 160 10/16/2023
1.0.4 181 10/10/2023
1.0.3 158 10/10/2023
1.0.2 169 10/10/2023
1.0.1 164 10/10/2023
1.0.0 191 10/10/2023