dioxus/packages/tui/examples/readme.rs

20 lines
348 B
Rust
Raw Normal View History

2022-01-01 06:08:31 +00:00
use dioxus::prelude::*;
fn main() {
dioxus_tui::launch(app);
2022-01-01 06:08:31 +00:00
}
fn app(cx: Scope) -> Element {
cx.render(rsx! {
div {
width: "100%",
height: "10px",
background_color: "red",
justify_content: "center",
align_items: "center",
"Hello world!"
}
})
}