LiteTUI 0.0.5
There is a newer version of this package available.
See the version list below for details.
See the version list below for details.
The owner has unlisted this package.
This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package LiteTUI --version 0.0.5
NuGet\Install-Package LiteTUI -Version 0.0.5
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="LiteTUI" Version="0.0.5" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LiteTUI" Version="0.0.5" />
<PackageReference Include="LiteTUI" />
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 LiteTUI --version 0.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: LiteTUI, 0.0.5"
#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 LiteTUI@0.0.5
#: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=LiteTUI&version=0.0.5
#tool nuget:?package=LiteTUI&version=0.0.5
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
LiteTUI
A simple text-based user interface library for console
Features
Controls
- Menu: Simple, Selection
- Input: Text Input control
- Info: Block under primary control
Peculiarities
- "Easy-to-use" asynchronous commands with live status updates in the menu
- UI rendering updates the interface regardless of user input
How to use
// Global App Context (Сan be inherited and create another context)
var context = new ApplicationContext();
var mainMenu = new Menu("Main Menu");
mainMenu.Items.Add(new MenuItem("Option 1", new YourCommand(context)));
// You don't have to use it if you're just close console
mainMenu.Items.Add(new MenuItem("Exit", new ExitCommand(context)));
// Main App runner, You can use any of controls instead menu
var app = new ApplicationRunner(context, mainMenu);
await app.RunAsync();
Selection Menu
var products = new List<Product>
{
new Product { Id = 1, Name = "Laptop", Price = 1200 },
new Product { Id = 2, Name = "Phone", Price = 800 },
new Product { Id = 3, Name = "Tablet", Price = 500 }
};
var selectionMenu = new MenuSelection<Product>(
context,
new SelectionService<Product>(products),
"Products",
p => $"{p.Name} - ${p.Price}",
new ChangeControlCommand(context, mainMenu)
);
Custom Control
public class MyControl : BaseControl
{
public MyControl(string title) : base(title) {}
public override bool HandleKey(ConsoleKeyInfo keyInfo)
{
// Do Some with input here
return base.HandleKey(keyInfo);
}
public override StringBuilder GetRenderContent()
{
var builder = new StringBuilder();
AppendHeader(builder);
builder.AppendLine("Your content");
return builder;
}
}
Text Input
// As control
var input = new TextInputControl("Enter Name");
input.InputCompleted += text => context.CurrentControl = mainMenu;
// As command
var cmd = new TextInputCommand(context, "Enter Name");
var name = await cmd.ExecuteAsync();
Note
I special didn't use complex system for this. This template is only for simple applications with MINIMAL functions.
DONT USE ANY OF THIS AS A DESIGN RECOMMENDATION
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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 was computed. 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 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
.NETStandard 2.1
- No dependencies.
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 |
---|---|---|
0.0.6.1 | 92 | 7/26/2025 |