revue 1.0.7

A Vue-style TUI framework for Rust with CSS styling
Documentation

A Vue-style TUI framework for Rust with CSS styling

crates.io docs.rs codecov

CI license Rust 1.87+ downloads

Quick Start · Examples · Documentation · Contributing

Why Revue?

Build terminal UIs like you build web apps — with CSS and reactive state.

  • CSS Styling — Write styles in familiar CSS syntax with variables, selectors, and animations
  • Reactive State — Vue-inspired Signal/Computed/Effect system for automatic UI updates
  • 70+ Widgets — Rich component library: inputs, tables, charts, markdown, images, and more
  • Hot Reload — See CSS changes instantly without restarting your app
  • Developer Tools — Widget inspector, snapshot testing, and performance profiler built-in
  • Single Binary — Pure Rust, no runtime dependencies, blazing fast

Quick Start

cargo add revue
use revue::prelude::*;

fn main() -> Result<()> {
    App::new()
        .stylesheet("styles.css")
        .run(Counter::default())
}

#[derive(Default)]
struct Counter {
    count: Signal<i32>,
}

impl View for Counter {
    fn view(&self) -> impl View {
        vstack()
            .class("container")
            .child(text!("Count: {}", self.count.get()).bold())
            .child(
                hstack().gap(1)
                    .child(button("-").on_click(|| self.count.update(|n| n - 1)))
                    .child(button("+").on_click(|| self.count.update(|n| n + 1)))
            )
    }
}
/* styles.css */
.container {
    padding: 2;
    gap: 1;
    border: rounded cyan;
    align-items: center;
}

button {
    padding: 0 2;
    background: var(--primary);
}

button:hover {
    background: var(--primary-dark);
}

Widgets

Category Components
Layout vstack hstack grid scroll tabs accordion splitter
Input input textarea select checkbox radio switch slider
Display text markdown table tree list progress badge image
Feedback modal toast notification tooltip popover
Charts bar_chart line_chart sparkline heatmap gauge

Examples

cargo run --example counter      # Basic counter
cargo run --example todo         # Todo app
cargo run --example dashboard    # Charts & widgets
cargo run --example forms        # Form inputs
cargo run --example markdown     # Markdown viewer

Comparison

Revue Ratatui Cursive Textual
Language Rust Rust Rust Python
Styling CSS Code Theme CSS
Reactivity Signal Manual Event Reactive
Hot Reload
Devtools

Documentation

Contributing

We welcome contributions! See CONTRIBUTING.md for guidelines.

git clone https://github.com/hawk90/revue.git
cd revue && cargo test

License

MIT License — see LICENSE for details.

↑ Back to Top

Built with Rust