tui-world
⚠️ Work in Progress: This library is development.
A state and event management library for TUIs built with ratatui.
Core Concepts
- World - A container that holds application state
- Keybindings - Key binding registry with built-in help display
- Focus - Tracks which widget is active
- Layout - Tracks widget areas for mouse hit testing
- Mouse - Mouse click handling per widget
Example
use *;
// Store state in world
world.insert;
// Register keybindings
let kb = world.;
kb.bind;
// Handle events
Key.handle;
Mouse.handle;
See examples/todo for a complete example.
License
MIT