SimpleTUI
SimpleTUI is a lightweight and cross-platform Text User Interface (TUI) library designed for simplicity and ease of use. Leveraging the powerful crossterm backend for input handling, SimpleTUI ensures a seamless cross-platform experience, making it an ideal choice for developers seeking a straightforward solution for building TUI applications.
Demo
OS: Windows 10 Pro

Features
-
Widget-Centric Design: Build your TUI applications using a widget-centric approach, where every component is a widget. This makes the library intuitive and developer-friendly.
-
Custom Widget: You can make your custom Widget easily.
-
Cross-Platform Compatibility: Leveraging the crossterm backend, simple_tui ensures consistent TUI behavior across different platforms, including Windows, macOS, and Linux.
-
Callback Support with
on_click: Effortlessly handle user interactions with theon_clickcallback, enabling developers to create responsive and dynamic UIs.
Super Widgets
Super widgets are the widget that implement EventHandler trait; it will give them special capabilities:
- Start application (drawing on the screen)
- Render other widgets
- Handle mouse, keystrokes, and resize events
This approche might change in future. But for now this will keep everything simple ;P
Widgets:
| Widget | Description | Status |
|---|---|---|
| vbox (sw) | Vertical layout | Available |
| hbox (sw) | Horizontal layout | Available |
| label | Text display | Available |
| button | Button with on_click |
Available |
| input | User text input | Todo |
| paragraph | Paragraph with title | Todo |
| ... more | ... | ... |
(sw) Super Widget
Getting Started
use *;
Add your custom Widget
To add your custom widget you need to do some steps:
-
add your widget into
enum Widget -
implement
AsWidgetfor your widget. -
Your widget MUST have those methods and fields:
In future:
- step 1, 2 will be dynamic.
- step 3 you will implement
CustomWidgettrait for your custom widget.
Example Usage
Callbacks with on_click
use *;
Horizontal Layout
use *;
Vertical Layout
use *;
Creating a Grid
use *;