revue 2.71.1

A Vue-style TUI framework for Rust with CSS styling
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
//! Simplest Revue example - Hello World
//!
//! Run with: cargo run --example hello_world

use revue::prelude::*;

fn main() -> Result<()> {
    let view = vstack()
        .gap(1)
        .child(Text::heading("Hello, Revue!"))
        .child(Text::muted("A Vue-style TUI framework for Rust"))
        .child(Text::info("Press 'q' or Ctrl+C to quit"));

    App::builder()
        .build()
        .run(view, |_event, _view, _app| false)
}