Build beautiful, reactive terminal apps with blazing-fast performance.
Zero dependencies β’ Signal-based β’ Flexbox layout β’ Native speed β’ Memory safe
50+ components. Pure Rust. No unsafe chaos. Maximum performance.
π JS Docs Β· π¦ API Spec Β· π InΓcio RΓ‘pido Β· π¦ Rust API Β· β‘ Performance
* Only libc for raw terminal mode
tuiuiu.rsnasce da mesma linguagem conceitual de tuiuiu.js. Use estes links da origem como fonte principal da API:
- π Docs: https://github.com/forattini-dev/tuiuiu.js#readme
- π¦ Entradas pΓΊblicas: https://github.com/forattini-dev/tuiuiu.js/tree/main/dist
- π§© Exemplos e casos de uso: https://github.com/forattini-dev/tuiuiu.js/tree/main/examples
- π§ͺ CLI / scripts: https://github.com/forattini-dev/tuiuiu.js#cli
- Projeto oficial: https://github.com/forattini-dev/tuiuiu.js
- EspecificaΓ§Γ£o dos exports: https://github.com/forattini-dev/tuiuiu.js/tree/main/dist
- HistΓ³rico de evoluΓ§Γ£o: https://github.com/forattini-dev/tuiuiu.js/releases
# Cargo.toml
[dependencies]
tuiuiu = "0.1"use tuiuiu::prelude::*;
fn main() {
let app = render(counter);
app.wait_until_exit();
}
fn counter() -> impl Component {
let (count, set_count) = create_signal(0);
use_input(move |key| match key {
Key::Up => set_count.update(|c| *c += 1),
Key::Down => set_count.update(|c| *c -= 1),
Key::Escape => app::exit(),
_ => {}
});
Box::new()
.border(BorderStyle::Round)
.padding(1)
.children([
Text::new("π¦ Tuiuiu Counter").color(Color::Cyan).bold(true),
Text::new(move || format!("Count: {}", count.get())),
Text::new("β/β: change β’ Esc: exit").color(Color::Gray).dim(true),
])
}cargo run| Category | Components |
|---|---|
| Core | Signals, Flexbox layout, Focus management, Event system |
| Primitives | Box, Text, Spacer, Newline, Fragment, Divider, Canvas |
| Atoms | Button, TextInput, Switch, Slider, Spinner, ProgressBar |
| Molecules | Select, MultiSelect, RadioGroup, Autocomplete, Table, Tabs, Tree, Calendar, CodeBlock, Markdown |
| Organisms | Modal, CommandPalette, DataTable, FileManager, SplitPanel |
| Templates | AppShell, Page, Header, StatusBar, VStack, HStack |
| Data Viz | BarChart, LineChart, Sparkline, Heatmap, Gauge |
Fine-grained reactivity β only what changes gets updated.
use tuiuiu::prelude::*;
let (count, set_count) = create_signal(0);
let doubled = create_memo(move || count.get() * 2);
create_effect(move || {
println!("Count: {}, Doubled: {}", count.get(), doubled.get());
});
set_count.set(5); // β "Count: 5, Doubled: 10"
// Batch multiple updates
batch(|| {
set_count.set(1);
set_count.set(2);
set_count.set(3);
}); // Only one render!CSS Flexbox model for terminals.
Box::new()
.flex_direction(FlexDirection::Row)
.justify_content(JustifyContent::SpaceBetween)
.align_items(AlignItems::Center)
.gap(2)
.padding(1)
.border(BorderStyle::Round)
.children([
Text::new("Left").color(Color::Blue),
Text::new("Center"),
Text::new("Right").color(Color::Red),
])use tuiuiu::molecules::*;
// Select dropdown
Select::new()
.items(["Option A", "Option B", "Option C"])
.selected(0)
.build()
// Table with columns
Table::new()
.columns([
Column::new("Name").width(20),
Column::new("Age").width(10).align(Align::Right),
])
.rows([
vec!["Alice".into(), "30".into()],
vec!["Bob".into(), "25".into()],
])
.build()
// Tree view
Tree::new()
.nodes([
TreeNode::folder("src").expanded(true).children([
TreeNode::file("main.rs"),
TreeNode::file("lib.rs"),
]),
])
.build()
// Calendar
Calendar::new()
.date(2025, 1)
.selected(24)
.today(2025, 1, 24)
.build()
// Charts
Sparkline::new().data([1.0, 4.0, 2.0, 8.0, 5.0]).build()
Gauge::new().value(75.0).max(100.0).label("CPU").build()// Keyboard
use_input(|key| match key {
Key::Char('q') => app::exit(),
Key::Up => { /* ... */ },
Key::Enter => { /* ... */ },
_ => {}
});
// With modifiers
use_hotkeys(|key, mods| {
if mods.ctrl && key == Key::Char('c') {
app::exit();
}
});
// Mouse
use_mouse(|event| match event.kind {
MouseEventKind::Click(MouseButton::Left) => {
println!("Click at ({}, {})", event.x, event.y);
},
_ => {}
});Pick what you need β unused code is not compiled.
# Full (default)
tuiuiu = "0.1"
# Minimal core only
tuiuiu = { version = "0.1", default-features = false, features = ["core"] }
# Just what you need
tuiuiu = { version = "0.1", default-features = false, features = ["molecules"] }| Feature | Contents | Includes |
|---|---|---|
full |
Everything | atoms, molecules, organisms, templates, themes |
core |
Signals, layout, renderer | β |
primitives |
Box, Text, Spacer, etc. | core |
atoms |
Button, Input, Spinner, etc. | primitives |
molecules |
Select, Table, Tabs, etc. | atoms |
organisms |
Modal, DataTable, etc. | molecules |
templates |
AppShell, Page, etc. | organisms |
themes |
Dark, Light, Monokai, etc. | β |
Why Rust?
| Metric | tuiuiu.rs | tuiuiu.js |
|---|---|---|
| Startup time | ~1ms | ~50ms |
| Memory usage | ~2MB | ~30MB |
| Binary size | ~500KB | N/A |
| Dependencies | 0* | 0 |
| Type safety | Compile-time | Runtime |
* Only libc for raw terminal mode
# Clone the repo
git clone https://github.com/forattini-dev/tuiuiu.rs
cd tuiuiu.rs
# Run examples
cargo run --example counter # Simple counter
cargo run --example dashboard # Full dashboard
cargo run --example 03_molecules # Component showcase| Feature | tuiuiu.rs | tuiuiu.js | Ratatui |
|---|---|---|---|
| Signal reactivity | β | β | β |
| Flexbox layout | β | β | β |
| 50+ components | β | β | β |
| Zero deps | β * | β | β |
| Mouse support | β | β | β |
| Native binary | β | β | β |
| Memory safe | β | β | β |
π For full documentation, concepts, and detailed API reference, see tuiuiu.js β the authoritative source.
| Topic | Description |
|---|---|
| Quick Start | Get up and running |
| Signals | Reactive state management |
| Layout | Flexbox for terminals |
| Components | All 50+ components |
| Mouse | Click, hover, scroll |
| Charts | Data visualization |
| Metric | Value |
|---|---|
| Components | 50+ |
| Dependencies | 0* |
| Hooks | 10 |
| Border styles | 9 |
| Named colors | 18 |
| Feature flags | 8 |
| Binary size | ~500KB |
The Tuiuiu (Jabiru mycteria) is a majestic Brazilian bird β the tallest flying bird in South America. Just like this bird stands out in its environment, Tuiuiu stands out in the terminal UI landscape: elegant, powerful, and distinctly Brazilian.
π§π· Made with β€οΈ in Brazil
MIT License
tuiuiu.js β JavaScript/TypeScript version β’ tuiuiu.rs β Rust version (you are here)