| Crates.io | minui |
| lib.rs | minui |
| version | 0.6.3 |
| created_at | 2025-06-17 03:36:26.111331+00 |
| updated_at | 2026-01-13 20:13:12.326326+00 |
| description | A minimalist framework for building terminal UIs in Rust. |
| homepage | https://github.com/JackDerksen/minui |
| repository | https://github.com/JackDerksen/minui |
| max_upload_size | |
| id | 1715161 |
| size | 718,231 |
MinUI is a lightweight terminal UI framework for building terminal applications in Rust. It's designed to be simple to use while providing the essential tools you need for terminal-based interfaces.
I wanted to build rich terminal apps in Rust, but I found existing libraries either too complex or missing the specific ergonomics I wanted. MinUI aims to stay minimal and approachable while still providing the foundations for responsive, interactive TUIs (including optional timed updates for animations).
MinUI is actively developed with these features available:
Container (unified layout + styling)ScrollBox (scrollable container backed by ScrollState)ScrollBar + Slider controls (vertical/horizontal)ScrollState + WindowView scroll offsets)InteractionCache, IdAllocator, AutoHide)Add MinUI to your Cargo.toml:
[dependencies]
minui = "0.6.3"
use minui::prelude::*;
fn main() -> minui::Result<()> {
let mut app = App::new(())?;
// Built-in application handler for event loops and rendering updates
app.run(
|_state, event| {
// Closure for handling input and updates.
// Capture input here!
match event {
Event::KeyWithModifiers(k) if matches!(k.key, KeyKind::Char('q')) => false,
Event::Character('q') => false,
_ => true,
}
},
|_state, window| {
// Closure for rendering the application state.
// Draw your UI here!
let label = Label::new("Press 'q' to quit").with_alignment(Alignment::Center);
// Draw the label to the window
label.draw(window)?;
// Manually flush window (flush buffered rendering system)
window.flush()?;
// Drawing succeeded
Ok(())
}
)?;
Ok(())
}
Run the examples: cargo run --example basic_usage
TUI Apps: The widget system makes it easy to build traditional terminal interfaces with Container-based layout + styling (borders/titles/padding/background), along with scrollable content (ScrollBox / Viewport) and interactive scroll controls (ScrollBar, Slider).
Realtime / animated apps: MinUI supports optional fixed frame rates (via the built-in app runner) for smooth animations, dashboards, and other continuously-updating terminal experiences. Use App::with_frame_rate(...) to enable Event::Frame.
Experimental game utilities: There is an experimental game module with early-stage plans for sprites/tiles/maps/collision. Expect breaking changes while it matures.
What makes MinUI different:
Built using: