mirror of
https://github.com/DioxusLabs/dioxus
synced 2024-11-10 06:34:20 +00:00
24 lines
530 B
Rust
24 lines
530 B
Rust
|
//! Example: README.md showcase
|
||
|
//!
|
||
|
//! The example from the README.md.
|
||
|
|
||
|
use dioxus::prelude::*;
|
||
|
|
||
|
fn main() {
|
||
|
dioxus::desktop::launch(app);
|
||
|
}
|
||
|
|
||
|
fn app(cx: Scope) -> Element {
|
||
|
cx.render(rsx! {
|
||
|
div {
|
||
|
h1 { "Form" }
|
||
|
form {
|
||
|
oninput: move |ev| println!("{:?}", ev),
|
||
|
input { r#type: "text", name: "username" }
|
||
|
input { r#type: "text", name: "full-name" }
|
||
|
input { r#type: "password", name: "password" }
|
||
|
}
|
||
|
}
|
||
|
})
|
||
|
}
|