A simple Terminal User Interface (TUI) library for .NET 9.0 that provides a scrollable text window using standard VT codes and the alternate terminal buffer.
- Display text content in a scrollable window
- Use arrow keys, page keys, home/end for navigation
- Automatic word-wrapping to fit terminal dimensions
- Visual scrollbar indicator
- Clean terminal handling using the alternate buffer
- Simple, fluent API
- .NET 9.0
- A terminal emulator that supports VT codes (most modern terminals)
Currently, you can include this library in your project directly:
dotnet add reference path/to/SimpleTUI.csproj
using SimpleTUI;
// Create a scrollable window with content
string content = "Your multi-line content to display...";
var window = TUI.CreateWindow(content);
// Optionally specify custom dimensions (width, height)
window.WithDimensions(80, 24);
// Display the window (blocks until user presses 'Q' to exit)
window.Show();
- ↑/↓ Arrow Keys: Scroll one line up or down
- Page Up/Down: Scroll one page up or down
- Home/End: Jump to beginning or end
- Q: Quit and return to normal console
The repository includes a demo project that showcases how to use the SimpleTUI library. Run the demo with:
cd Demo
dotnet run
MIT