ez-tui 0.0.0-alpha.3

A framework to create terminal user interfaces in Rust with Ratatui
Documentation

EZ TUI

ez-tui is a library for building terminal user interfaces (TUIs) in Rust written by a beginner for his own needs.

You probably should not use this for production app; if you do, or are just looking at the code, keep in mind I'm a beginner fully open to critics about my code or design choices, so feel free to reach out on matrix: @nindouja:matrix.org

History

I created some basic TUIs to learn rust, but I was copy/pasting boilerplate from one to the other everytime.

I tried tui-realm which is great but I got limited to achieve what I wanted (receiving events from external lib), it was maybe a skill issue but couldn't find a nice solution.

So now I'm building this to learn rust while being heavily inspired by tui-realm. As of now some of the code is still copied from tui-realm. I intend to adapt it to my needs but for the current POC it works great.

I doubt this lib will be really useful to anyone as it's probably really opiniotated; and maybe in a bad way as I'm a rust beginner and not that good at designing. But if it ends up not being just a learning experience and is actually useful, I will be glad to work towards making it a proper library and include suggestions.

Features

  • Extends the lib defaults with your own:
    • Cli arguments
    • Global state
    • Messages
    • Global hotkeys
  • Focus management
  • Event handling
  • Reusable components - Write your own or reuse the provided ones
  • Easy form creation
  • External events sources

Included components

  • State debugger
  • Log viewer
  • Frame/Tick indicators
  • Form inputs
    • Date and/or Time
    • Text
    • Password
    • Range
    • Number
    • Checkbox
    • Radio group

Usage

As the interface will probably change a lot I don't have proper doc yet. But I keep one full example that should make use of all core features.