| Crates.io | tui-world |
| lib.rs | tui-world |
| version | 0.1.0 |
| created_at | 2026-01-17 20:22:48.529792+00 |
| updated_at | 2026-01-17 20:22:48.529792+00 |
| description | A state and event management library for TUIs built with ratatui |
| homepage | |
| repository | https://github.com/preiter93/tui-world |
| max_upload_size | |
| id | 2051080 |
| size | 79,791 |
⚠️ Work in Progress: This library is development.
A state and event management library for TUIs built with ratatui.
use tui_world::prelude::*;
// Store state in world
world.insert(MyAppState::default());
// Register keybindings
let kb = world.get_mut::<Keybindings>();
kb.bind(
Context::Widget(MY_WIDGET_ID),
KeyBinding::key(KeyCode::Enter),
"Select",
"Select the current item",
|world| {
world.get_mut::<MyAppState>().select();
},
);
// Handle events
Event::Key(key).handle(&mut world);
Event::Mouse(mouse).handle(&mut world);
See examples/todo for a complete example.
MIT