| Crates.io | tuitui |
| lib.rs | tuitui |
| version | 0.1.1 |
| created_at | 2025-10-19 15:05:39.584154+00 |
| updated_at | 2025-10-19 15:52:02.355448+00 |
| description | Build terminal interfaces faster. A batteries-included TUI framework for Rust with low boilerplate and a rich component ecosystem. |
| homepage | |
| repository | https://github.com/tayenx3/tuitui |
| max_upload_size | |
| id | 1890525 |
| size | 63,056 |
Build terminal interfaces faster. A batteries-included TUI framework for Rust with low boilerplate and a rich component ecosystem.
use tuitui::prelude::*;
struct Mascot;
impl App for Mascot {
fn display(&mut self, ui: &mut Ui) {
ui
.ascii_art("Tuitui")
.text(text!(
span!(" _\n", color Color::RGB(122, 98, 168)),
span!(" (", color Color::RGB(122, 98, 168)),
span!("'v'", color Color::RGB(188, 163, 225)),
span!(")\n", color Color::RGB(122, 98, 168)),
span!("//", color Color::RGB(122, 98, 168)),
span!("-=-", color Color::RGB(245, 235, 220)),
span!("\\\\\n", color Color::RGB(122, 98, 168)),
span!("(\\", color Color::RGB(122, 98, 168)),
span!("_=_", color Color::RGB(245, 235, 220)),
span!("/)\n", color Color::RGB(122, 98, 168)),
span!(" ^^ ^^", color Color::RGB(122, 98, 168))
));
}
fn update(&mut self, key: Option<Key>) -> bool {
if let None = key {
return true
}
let key = key.unwrap();
let mut quit = false;
match key.key {
InputKey::Esc => quit = true,
_ => {}
}
!quit
}
fn get_fps(&self) -> u32 {
60
}
}
fn main() -> Result<()> {
AppRuntime::new().run(Mascot)
}
Don't be scared! This is a full setup so it might look big!
Join our flock, contribute, and build amazing-ness 🐧