Expand description
OSUI โ A Rust Terminal User Interface Library
OSUI is a library for building interactive and customizable terminal user interfaces in Rust.
It provides a component system, real-time keyboard input handling, and a rsx!
macro
for defining UI elements in a declarative way, however that is optional.
โ Features
- ๐งฑ RSX-like syntax with
rsx!
macro - ๐ฅ๏ธ Virtual screen abstraction
- ๐น Keyboard input handling
- ๐ฏ Component-based design
- โก Real-time rendering
๐ Quick Example
use osui::prelude::*;
fn main() -> std::io::Result<()> {
let screen = Screen::new();
rsx! {
"๐ Hello, World!"
}.draw(&screen);
screen.run()
}
๐งฐ For full documentation, visit: osui.netlify.app/docs
๐งช Examples and demos: github.com/osui-rs/osui/demos
Modulesยง
- elements
- extensions
- frontend
- The frontend binder for OSUI.
- macros
- prelude
- render_
scope - Rendering logic and layout scope management for OSUI.
- state
- style
- Layout and style definitions for OSUI widgets.
- utils
- The
utils
module provides utility functions for terminal manipulation and string operations, designed to enhance terminal-based applications. - widget
- Core widget infrastructure for OSUI.
Macrosยง
- component
- Declares a struct that implements the
Component
trait. - event
- Declares a struct that implements the
Event
trait. - event_
handler - Creates an event handler closure that calls a method on
self
. - rsx
- Constructs an
Rsx
tree using declarative syntax. - rsx_
inner - Internal macro used by
rsx!
to recursively buildRsx
trees. - transform
- Creates a
Transform
with property overrides.
Structsยง
- NoRender
- NoRender
Root - Render
Wrapper Event - Screen
- The main screen abstraction for rendering and managing widgets and extensions.